Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change value in combo
Message
From
12/04/2001 07:13:53
 
 
To
11/04/2001 11:40:36
Ben Dekker
Dekker Soft & Hardware
Axel, Netherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00494464
Message ID:
00494776
Views:
17
Hi Ben.

>> In the valid event i have the next code

IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0 <<

This means that the user has typed a value into the combo that is not in the list. What you want to do here is add the new value to the underlying RowSource and Requery the combo.
IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
  *** This next statement assumes that the RowSourceType of the combo
  *** is 2-Alias. If not, just change rthe code the suit your
  *** RowSourceType
  INSERT INTO ( This.RouwSource ) VALUES ( This.DisplayValue )
  This.Requery()
ENDIF
You do not need to do a replace in the bound table as long as you set the ControlSource of the combo. It will update the bound table - no code required.

Or are you saying that you want the user to be able to update the bound control with a new value without having to add the new value to the control'd RowSource? If this is what you want to do, this is a different issue.

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform