4 Subforms in 1 Main Form

  • Thread starter Thread starter Arvin Villodres
  • Start date Start date
A

Arvin Villodres

I want to create a form with 4 subforms whose data being
shown are dependent in one of the subforms.

MainForm
CustomerID

SubForm1
Linked CustomerID to CustomerID of MainForm
INVNo

Subform2, Subform3, Subform4
Linked InvNo to INVNo of Subform1

How do I do this?
 
Subform1 needs to contain the linking field to the main
form using CustomerID. Set the link when you put Subform1
onto the main form.

The same is true when placing Subforms 2, 3 and 4 onto
Subform1. Make sure that the linking field InvNo is
present on Subform1 and on Subforms 2, 3 and 4. Set the
linking fields as you place each of the subforms onto
Subform1.
 
Thanks for the reply.

I tried doing this. When I click the cursor on Subform1 the
data changes on Subform2 but not on Subform3 and Subform4.
Did I forget something?
 
Hi Arvin -

This is Steven from Microsoft Access Technical Support replying to your
newsgroup post.

For a subform to reference a key field on another subform, you will have to
set these properties as follows:

LinkChildFields: CategoryID
LinkMasterFields: Forms!frmMain!Sub1.Form!CategoryID

In other words, the key field between the second subform and the first
subform is called CategoryID. So I set LinkChildFields property equal to
the CategoryID field on the second subform. Then to get to the same key
field on the first subform, you have to "drill" you way down, starting from
the main form layer. So frmMain is the name of my main form. Sub1 is the
value assigned to the Name property of the first subform object on the main
form.

Please let me know if this solves your problem or if you would like further
assistance. I look forward to hearing from you.

Sincerely,
Steven Parsons [MSFT]
Microsoft Access Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! (http://www.microsoft.com/security)
 
Back
Top