Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box User entered value???
Message
 
To
29/02/2000 21:42:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00339562
Message ID:
00339616
Views:
18
Gene,

Combo's value property is used to update its controlsource. The Value property can only be an item from the list (regardless of the style setting). As you have seen, using the drop down combo style allows the user to type in values that are not in the list, but these new values will only affect the DisplayValue property. When the controlsource has a value that is not in the list a blank is shown in the combo.

You must add the new item to the combo's list to get it to "stick". You can do this easily if you dump the Alias RowSourceType and use None instead. In the combo's Init read the table and use AddListItem() to populate the list. When the user types in something not in the list this condition will occur This.DisplayValue <> This.Value, then you can use AddListItem to add the new value to the list. In the refresh event you can check to see if the controlsource value is not in the list and add it if needed. None of this requires that you actually add records to the table the combo uses initially to populate itself.
Previous
Reply
Map
View

Click here to load this message in the networking platform