Sub-Forms NOT. Main form with two subforms, want to link

bill

Well-known Member
Joined
Mar 7, 2002
Messages
550
Access is good about linking a SUB-FORM to a MAIN form

But, looking for code to sync to subforms on a main form.

The main form is only a holder, not bound, no data, etc...

Have done research on:
LinkChildFields
LinkMasterFields

but have found nothing meaningful.

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Re: Sub-Forms NOT. Main form with two subforms, want to lin

What is the relationship between these two subforms? Like a Master-Child sort of thing or are they even related at all? The way that I do two Master-child subforms on a main "container" form is:
-Place both subforms where you like
-In the Child's Recordsource, select all of the fields that you'll want to see and in the Criteria of its Foreign Key, write:
Code:
Forms!Your_Main_Container_Form!Your_Parent_Subform.form!Your_Parent_Subform_Primary_Key
-And then, to get the Child to display the related records for each Parent record, in the Parent's On_Current event:
Code:
Your_Parent_Subform_On_Current()
forms!Your_Main_Container_Form!Your_Child_Subform.Requery
End Sub
Is this what you're looking for or did I miss your point completely?
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,357
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top