Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the Grid control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669516
Message ID:
00669526
Vues:
12
I don't know if the children in this example are siblings, or if they're children and grandchildren of the master, but IAC, it looks like you're setting up the relationships backwards. You want to set a relation from the master to the child if you want the record pointer to move in the child when you move the pointer in the master. They way you're doing it, when you move the record pointer in the child, it will automatically move the pointer in the master, but not the other way around.

The syntax isn't quite right either--it's INTO the table, not ON the table.

>Hi,
>My program uses 3 grids to display data from 3 tables. The user will query on one of the tables and the resulting form should display the data from that table in the first grid and the child records corresponding to this record from each of the other tables in the other grids.
>
>The program uses Set Relation command so that the child records will be automatically selected.
>
>This is how the code looks:
>
>Use MasterTbl in 0 tag MTag
>Use ChildTblA in 0 Tag DTag1
>Use ChildTblB in 0 Tag DTag2
>Select ChildTblA
>Set relation to MTag on MasterTBl
>Select ChildTblB
>Set relation to Dtag1 on ChildTblA
>Select ChildTblC
>Set relation to Dtag2 on ChildTblB
>
>Later I modified these index tags e.g. the expression for DTag1 is
>Upper(field1).
>
>I noticed that I needed to modify the above Set Relation commands as shown below to get the same results. Am I doing it the right way?
>
>
>Select ChildTblA
>Set relation to Upper(MTag) on MasterTBl
>Select ChildTblB
>Set relation to Upper(Dtag1) on ChildTblA
>Select ChildTblC
>Set relation to Upper(Dtag2) on ChildTblB
>
>Thank you.
>
>Ria
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform