>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