Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Puzzled with combobox.displayvalue
Message
De
05/09/2001 17:09:50
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
05/09/2001 17:03:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00552834
Message ID:
00552838
Vues:
13
Chris-

>I've got this code in the interactive change event of a combobox.
>
>with this
>    .displayvalue = alltrim(noDispAns.answer) + " - " + alltrim(noDispAns.ansdescrip)
>endwith
>
>
>No problem, that works correctly. (btw, noDispAns is a cursor) The combo box is based on a sql statement, it has 3 columns. The third column is the control source. It turns out that after the code I posted above is run the combobox.value is blank. If I take out that line, it is correct.

DisplayValue will be the first column from the selected item in the combobox. If you want it to be a concatentation of fields then you would want, it seems to me your first column in the select to be the concatenation. For example,
SELECT alltrim(noDispAns.answer) + " - " + alltrim(noDispAns.ansdescrip) AS DisplayedValue, AnsName, ansID FROM noDispAns
I'm making up the fields AnsName and ansID, of course.

Then have BoundColumn = 3, ControlSource = whatever field it needs to be, and BoundTo = .T..

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform