Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00303481
Message ID:
00303499
Vues:
24
Hi Brad.

>> But when I try to enter a value in the field that is a drop-down combo that is not in the file, it puts it in the mastfile but when I hit the save button on the screen, the value disappears. Also, when I call the master record up, even though a value is in the field, if that value is not a valid record in the subsidiary file, the field on the screen is blank. <<

This is what I would expect to happen. You need to take some action in the combo's valid to determine whether or not he has typed something into the text box portion of the control that is not in its list. You must then take action to add the item to the combo's RowSource with code similar to this:
WITH This
  IF .ListIndex = 0
    IF !EMPTY( .DisplayValue )
       lcValue = .DisplayValue
       *** Add the item to the list's RowSource here
       *** A new item has been typed into the combo
       .Requery()
       .DisplayValue = lcValue
    ENDIF
  ENDIF
ENDWITH
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform