Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to program a parent/child form with two tabs
Message
De
16/12/1999 23:29:38
 
 
À
16/12/1999 22:36:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00305086
Message ID:
00305097
Vues:
18
>I am using a parent/child for in my application. The form has two pages on it. The first page holds the parent data and the second page holds the child data. I want to know the best way to handle the child data. Currently, I use the set relation command in the activate method of the second page, so when the user goes to the second page they only see the records related to the parent record. This is a heavy data entry system so speed is critical.
>
>Thanks, Chris

The recommended wqay is to use a parameterized view to show the child data.

Define a view that only shows records belonging to a single parent by parameterizing the WHERE clause:

CREATE SQL VIEW MyView AS SELECT ChildTable.* FROM ChildTable WHERE ChildTable.ParentID = ?lnid

Then, in the activate event of your second page (or whereever you want to put it), put code like:

lnid = ParentTable.id
REQUERY("MyView")
THIS.Refresh()
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform