Problem in Access 97 Using Forms and Sub Forms
Can anyone help me with some information on how many sub forms I can add to
on main form and how I would go about to interlink these forms to each
other. For lets say the main forms ID must link to the first Sub forms ID,
the First Sub Forms Control Key must Link to the second Forms Control key
and so on.
Any help would be greatly appreciated, thanks,
Re: Problem in Access 97 Using Forms and Sub Forms
You can nest subforms up to 3 times. In other words you can place a sub
form into another up to 3 times. You can link the subforms by selecting
the relationship between the parent (main form or upper level subform) and
the child subform by using the Link Master Fields and Link Child Fields.
If you are linking the forms w/ more than one field then you must delimit
the fields using a semicolon (i.e. ParentID;ParentEvent).
Access will handle the requerying of the subforms when you move records on
the parent form.
As for the number of subforms on a form. The subform is a native access
control. Hence, you are limited by the number of controls that you can place
on a given form. Yet, it is good practice to use a control to select the
desired subform that you want to view. This also saves screen real estate.
You can use a tab control to do this. Use the onchange event to set the
sourceobject property of the subform control to the name of the form that
you would like to place in the subform. This works better than placing all
of the subforms on the screen and showing and hiding them appropriately because
you can load the subforms (and recordsets) on demand.
"Barend Esterhuizen" <email@example.com> wrote:
>Can anyone help me with some information on how many sub forms I can add
>on main form and how I would go about to interlink these forms to each
>other. For lets say the main forms ID must link to the first Sub forms ID,
>the First Sub Forms Control Key must Link to the second Forms Control key
>and so on.
>Any help would be greatly appreciated, thanks,
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center