Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two Listboxes and Parent->Child Relationship
Message
De
07/10/2004 10:37:38
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
07/10/2004 09:53:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00949516
Message ID:
00949541
Vues:
28
This message has been marked as a message which has helped to the initial question of the thread.
Tracy,

I assume the problem is that the setup is filtering the child records. Instead of setting a relation into the child table, how about doing a SEEK(BridgeKey,"LBridges") in the interactivechange event?

Regards,
Jim


>I have two listboxes on a form. One displays the fields on a parent table and one displays the fields on a child table. I do NOT want to filter the child records so that only the matching child records display in the child listbox. Instead, I want all records in the child table to display in the child listbox. However, when the user manueuvers through the parent table in the parent listbox, I want the listindex on the child listbox to be the recno for the matching record in the child table.
>
>Both listboxes are setup as Fields and display the foreign index key in column 1.
>
>The relationship is as follows:
>SELE BRIDGES && parent table
>SET ORDER TO TAG compsort && BRIDGEKEY + COMPANY
>SELE LBRIDGES && child table
>SET ORDER TO TAG BRIDGEKEY && foreign key
>SELE BRIDGES
>SET RELATION TO BRIDGEKEY INTO LBRIDGES ADDITIVE
>GO TOP
>
>I have the following code in the interactive change event of the parent listbox but it only works if focus is shifted to the child listbox:
>
>*this is lstbridges.interactivechange event - parent listbox
>*lstlbridges is the child listbox
>thisform.currentbridge = bridges.bridgekey
>thisform.lstlbridges.listindex = RECNO('lbridges')
>thisform.ifield.refresh() && control displays the child listbox's listindex
>thisform.Refresh
>
>I know the record pointer is moving as it should in the child table because I have another field on the form that displays the values in the child table and they change to the appropriate values for the matching record in the child table when I step through the records in the parent table in the parent listbox.
Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform