Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box just won't keep hand entered text
Message
 
 
To
17/02/2005 08:34:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00987581
Message ID:
01134444
Views:
23
>Combobox, setup with builder, keeps pick list values (one column) fine but not keyboard entered data, it just won't retain. Has to be something simple as all combobox documentation suggests you can keyboard or pick from the list.
>
>As the others have said, if you type in a value that is not in the combo's internal list, you must take specific action in the combo's Valid() to add the new value to the list. How you do this depends on the RowSOurceType of the combo. For example, with a RowSOurceType of 2-Alias ot 6-Fields, you need to add the record to the underlying cursor and then reuqery the combo like so:
>
>
>IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
>  *** The user typed in something that is not in the combo's
>  *** list. Take action here to add the entry
>  INSERT INTO SomeTable ( SomeField ) VALUES (This.DisplayValue )
>  This.Requery()
>ENDIF
>
Marcia,

What if the user typed the new value, then re-typed? The wrong new value would be still in the list...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform