Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding data to a bound combo box
Message
From
25/03/2001 07:03:10
 
 
To
24/03/2001 20:54:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00488389
Message ID:
00488428
Views:
15
Hi Bill.

>> Then in the combo's LostFocus ( or possibly Valid ) event you cant test on the combo's Value and DisplayValue properties. If they are not the same, a new value was typed in by the user. You can then run code to take whatever action is necessary, e.g. add the new value into the combo's list <<

This strategy only works if the combo's BoundColumn is column 1. A better strategy would be to test for:
IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
   *** The user typed in a value not in the combo's list
   *** Take action to add the item to the list
   *** And don't forget to requery the combo
   This.Requery()
ENDIF
This will work regardless of which column is the BoundColumn.

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform