Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using combo box I would like user to be able to to type
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00394473
Message ID:
00394507
Views:
10
Hi Walt,

That's the way a combo works, if the user types in a value that is not in the combos list, the combo doesn't know what to do with it, so it just gets discarded.

The value the user typed in will be in the combo's DisplayValue property. You have to write code in the combo (say the valid event) to add the DisplayValue to the combo's list and to the underlying table if you want.

Look for file#9596 "Dropdown Combo" in the files list. It should automagically add the custom value into the combo's list, which should save it into the ControlSource. You will have to write code to add it to the lookup table if you want that.


hth
>custom city.
>
>On a form with a dropdown combo with the control source being a city field in a record. The row source is SQL and I use
>"Select name from city order by name in to cursor temp" to fill the combo. They also may type in a city not on the list. What happens is when I bring up the form on a record that had a city not on the list it blanks out the combo instead of showing the value in the city field of the current record. Appearantly if it isn't in the combo's item list it shows blank? Whats up? Is there a workaround? I have tried manually populating the combo with additem and then also adding the custom city but it is much slower and how do i know that the custom item hasn't already been added to the list and add it again without scanning the entire item list (about 400 cities). Anybody got any ideas?
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Reply
Map
View

Click here to load this message in the networking platform