Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo/list box tip for newbies
Message
De
11/12/1999 14:21:29
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combo/list box tip for newbies
Divers
Thread ID:
00302269
Message ID:
00302269
Vues:
48
Here's an obscure (to me, anyway) bit of knowledge that might save you some headaches if you're not currently aware of it (I would have had BIG problems later on if a vigilant user hadn't noticed the problem):

If you have a list/combo box bound to a numeric field, the value stored in the field might not match that which is selected and displayed. By default, for numeric control sources, VFP stores the Listindex property value of the selected item, which is the number representing the selected item's position in the list (the first is 1, the second 2, etc.) This is fine if the items in your list are 1, 2, 3, etc. But if, like me, your list starts at 0, you're going to have a problem, which won't be obvious since the form will still always display the selected value, but the value actually in the record will be different -- in my case, starting at zero, 0 stores as 1, 1 as 2, etc.

To overcome this, set the BoundTo property to true (.T.), which will store the value of the List property -- the actual value selected.
"Ignorance more frequently begets confidence than does knowledge."
-- Charles Darwin
"I am invincible! Invincible...OWWWWWWWW!"
-- Homer Simpson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform