Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to program a parent/child form with two tabs
Message
From
16/12/1999 23:29:38
 
 
To
16/12/1999 22:36:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00305086
Message ID:
00305097
Views:
17
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform