Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBoxes
Message
From
02/05/2003 16:14:41
 
 
To
02/05/2003 14:27:15
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00784280
Message ID:
00784361
Views:
16
I have a combobox that allows the user to add to the list it's attached to. When I enter a new item and tab off the combobox the display value is empty, but I the new item to be the one that is selected. Is there a setting to do this or do I have to write code for this?

You have to write code to add the newly entered value to the list's RowSOurce. Code like this in the valid should do it for you:
IF This.ListIndex = 0 AND NOT EMPTY( This.DisplayValue )
   *** Code here to add the entry to the underlying data
   *** If the RowSOurceType is 2-Alias or 6-Fields, this means 
   *** Adding the new item to the table from which the list
   *** gets its Data
   *** Then requery the control's internal list
   This.Requery()
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform