Synchronised Subforms

  • Thread starter Thread starter smckells
  • Start date Start date
S

smckells

Guest
Hi

This one has been annoying me for days now because I know it can be done and I've done it before but can't remember how.

I have a form which contains two subforms. Subform1 is a datasheet and contains summary data. Subform2 is the detail relating to the records in Subform1. When the user opens the entire form Subform1 will contain multiple rows but subform2 will only display the selected row from subform1. However when I move to a different row in subform1 the record in subform2 does not change. This is basically the reverse of a one-to-many form.

Would really appreciate some help

Steve
 
welcome to the site

Simply link the second subform to the FK of the first subform...

Regards

The Mailman
 
...and please delete the other copy of this thread...
 
Mailman

Thanks for your reply however this would not work. Sorry I never made it clear enough. The data in subform2 comes from the same table as subform1. Subform1 basically is a summary of the detail that would be displayed in subform2. Therefore linking the FK would not work.

Cheers

Steve
 
Well then in that case the PK would be the FK wouldnt it? As the record is revering to it self....

Regards
 
Create a textbox on the main form with the controlsorce set to
=Forms!MainFormName!SubformName.Form!ControlName
On the master/child links of Subform2, set the child link to the field on the subform but set the master to the control you have just set up on the main form

ie
Master = Forms!MainForm!Control Name
Child = FieldName

hth
 

Users who are viewing this thread

Back
Top Bottom