Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with combobox
Message
De
01/04/1999 10:48:58
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00204250
Message ID:
00204255
Vues:
17
>Hello,
>I have a combobox on my form, where three values are predfined for the user to choose from. So, the Rowsource Type is 1 (VALUE).
>The user has to be able also to enter another value, which is NOT in the value list. But if the user enters text into the combobox, the form does not recognize this value.
>The combobox is bound to a table field, the table is buffered (5). I thought, it should not be a problem, but I didn't find the solution.
>What do I wrong with my combobox?
>Thanks in advance for your time!

When you type something to combo text portion which is not in the list portion, you actually set DisplayValue property, and you must provide that this will go to the controlsource programmatically, e.g.
***Combo.LostFocus event
IF NOT (This.Value==This.DisplayValue)
 Replace Mytable.Myfield With This.DisplayValue
ENDIF
IMHO, the more robust way to handle all these problems is to use unbound combo (no controlsource).
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform