Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo won't show value in table
Message
From
11/08/1997 13:18:23
 
 
To
11/08/1997 12:04:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00043996
Message ID:
00044023
Views:
33
>>I am having trouble getting a combo box to show the values in a table field. Here is the behavior I want: the user should be able to enter any text value into the field, or should be able to choose from a list of values that occur frequently. For example, the combo box items might be common colors such as red, blue, etc, but if the user wants the data to be "sky blue" he can type that in.
>>
>>I have the rowsource set to a small table with the common values, and the control source set to the table field for the data. My problem is in displaying the value in the combo. If one user types in "sky blue", that value is saved but it doesn't show on another user's form because "sky blue" is not a record in the combo's row source. I do not want to add "sky blue" to the rowsource table.
>>
>>How does one get the combo box to display values that aren't in its rowsource but are in its controlsource?
>>
>>Thanks,
>>Ross
>
>Use DisplayValue property (fire this code from form refresh utility):
>Thisform.Combo1.DisplayValue=table1.colorfield && might be "sky blue"

Edward, it seemed to me that that should work, but it doesn't. In fact, it replaces the value in the table with an empty string. Can you think of what I might be doing wrong?

Thanks,
Ross
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform