Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change value in combo
Message
De
12/04/2001 07:13:53
 
 
À
11/04/2001 11:40:36
Ben Dekker
Dekker Soft & Hardware
Axel, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00494464
Message ID:
00494776
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform