Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Doin' the mombo combo
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00305545
Message ID:
00305565
Views:
22
>I have a combobox based upon an array. I can select a city from a drop-down list and it appears in my combobox. I can also type in the name of a city that is not in the drop-down list and it appears in my combobox.
>
>But when I try to move a value into the combobox without selecting it from the drop-down or typing it directly into the combobox I get a blank combobox.
>
>I tried changing the RowSource to "" and RowSourceType to 0 before moving the value into the combobox. As in THISFORM.cbo_mycombobox.Value = gcCity
>
>gcCity if the name of a city that is incoming from another form. And I know that gcCity contains a value because I displayed it just before trying to put it into the combobox.
>
>Any ideas? I can't seem to find a way.

If you want to show in the text protion something that is not in list portion, then you should use Combo.DisplayValue property:
Combo.DisplayValue='mycity'
If you're sure that the value is in the list, then make sure that entries in rowsource and your value have the same length, i.e. everything is trimmed/padded properly.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform