Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary and foreign key fun with combos and grids?
Message
De
02/07/2002 14:37:59
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00673883
Message ID:
00674638
Vues:
24
>>if you have any controlsources for combo, throw it away
>Thanks Vladimir - I wondered why I should not have this in - as I undertand it this is the data which the control is bound to so that edits get detected and saved etc...
Yes, this is so, but if field of the controlsource is integer ( primary field from lookup table) and few records were deleted , so keys have gaps, it can cause wrong behaviour
I usually imitate controlsource by click venet setting key in parent and in refresh , setting displayvalue of the combo from parent table (key) making seek into lookup table
If key are not integer, but character, it works (controlsource) in anather way.
I know this for sure
Make simple lookup table withkeys 1,2,3,4,5
connect them to parent table with combo
Now delete record with key number 4 from lookup an d now look , what combo will show for parent table related to key number 5
That is why I never use combo controlsource and imitate it works by the code
MVP-2006-2011, PHD in Math and Physics ,
host of www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform