Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Puzzled with combobox.displayvalue
Message
From
05/09/2001 17:36:32
 
 
To
05/09/2001 17:09:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00552834
Message ID:
00552858
Views:
17
Hi Nancy,

Thank you very much. :) It worked.

Chris

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform