Originally Posted by
aytee111
In this case, the ID's are passed thru the two LINK properties of the subform. So, create a form which will be the top of the hierarchy, the father of the structure. Next, create another form, this is to be next in line, a child of the father. Then, open the first/father form in design view, add the child form as a subform. If both forms are bound forms (they have a record source), then a wizard will appear in which you say - this field from the top form and this field from the subform are used to link the two forms. If either or both the forms are unbound (blank record source) then you will type in the two linked field names (one from the father and one from the child) saying how the data is linked. Such that when you have a record in the top form with a value of "1" then the subform will link to that and will show only the record(s) with a "1" in the matching/link field.
You can carry on doing this down thru the levels, picking one field from the "main" form/table and the matching field from the subform/table and putting them in the LINK properties. This is how ID's (or any field) is passed down the hierarchy.
First subform: DemoID master, DemoID(FK) child
Second (third, etc): ExamID master, ExamID(FK) child
Your relationships window shows a visual representation of this (in the case of bound forms).
If you want to use a tabbed design on the form, add a tab control to the form (Design>select the Tab Ctrl icon). This will add a tab control with two pages. Click on the first page and drag your first subform onto it, then click on the second page and drag the second subform onto it. Go into form design and test it.
Clicking on the page will bring up its properties, change the name and any other properties. Right-clicking on the page will allow you to insert other pages.
To practice, create some very simple forms with only the fields to pass down, and concentrate only on getting that working before bothering about the rest (tab,etc). Add one subform at a time and get it working before moving on to the next.