Main form with two subforms on it and linked to it

  • Thread starter Tom K via AccessMonster.com
  • Start date
T

Tom K via AccessMonster.com

Hi, is it possible to have a main form with two subforms linked to that main
form. Each subform has a parent/child relationship with the main form. Each
subform comes from a separate table which is linked to the main forms table
with a one/many relationship. The subform tables are on the many side.

I have a Venue table with a one/many relationship to the Contacts and
Violations tables. They are linked by VenueID. I would like a main form with
each subform on its own tabcontrol on the main form.

Can I do this?

Thanks
Tom
 
T

tina

yes. build the main form, including the tab control. build a form for the
Contacts table, and another form for the Violations table. open the main
form in design view, and select the first tab page. in the Toolbox toolbar,
click the Subform/Subreport button, then click anywhere within the tab page
to place the control on the page. in the Properties box, click on the
SourceObject line and click the down arrow at the right. select the name of
the Contacts form from the droplist. set the LinkMasterFields property to
the name of the Venues primary key field. set the LinkChildFields property
to the name of the matching foreign key field in the Contacts table. (if you
linked the tables properly in the Relationships window, Access may set these
two properties automatically.)

repeat the above, to create the Violations subform.

hth
 
T

Tom K via AccessMonster.com

Thank you very much!

Tom
yes. build the main form, including the tab control. build a form for the
Contacts table, and another form for the Violations table. open the main
form in design view, and select the first tab page. in the Toolbox toolbar,
click the Subform/Subreport button, then click anywhere within the tab page
to place the control on the page. in the Properties box, click on the
SourceObject line and click the down arrow at the right. select the name of
the Contacts form from the droplist. set the LinkMasterFields property to
the name of the Venues primary key field. set the LinkChildFields property
to the name of the matching foreign key field in the Contacts table. (if you
linked the tables properly in the Relationships window, Access may set these
two properties automatically.)

repeat the above, to create the Violations subform.

hth
Hi, is it possible to have a main form with two subforms linked to that main
form. Each subform has a parent/child relationship with the main form. Each
[quoted text clipped - 9 lines]
Thanks
Tom
 
T

tina

you're welcome :)


Tom K via AccessMonster.com said:
Thank you very much!

Tom
yes. build the main form, including the tab control. build a form for the
Contacts table, and another form for the Violations table. open the main
form in design view, and select the first tab page. in the Toolbox toolbar,
click the Subform/Subreport button, then click anywhere within the tab page
to place the control on the page. in the Properties box, click on the
SourceObject line and click the down arrow at the right. select the name of
the Contacts form from the droplist. set the LinkMasterFields property to
the name of the Venues primary key field. set the LinkChildFields property
to the name of the matching foreign key field in the Contacts table. (if you
linked the tables properly in the Relationships window, Access may set these
two properties automatically.)

repeat the above, to create the Violations subform.

hth
Hi, is it possible to have a main form with two subforms linked to that main
form. Each subform has a parent/child relationship with the main form.
Each
[quoted text clipped - 9 lines]
Thanks
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top