Synching subforms based on same table in a tabbed control...Help

  • Thread starter Steven Menasche via AccessMonster.com
  • Start date
S

Steven Menasche via AccessMonster.com

All,

I have a form (x_frm) that has a tabbed on control with 2 tabs.

On tab1 I have a subform control. On tab2 I have another subform control
that is based on the same table as the subform on tab1.

When I move to a record on tab1/tab2, I want each of the subforms to move
to the same record.

There are too many reasons to list as to why, I just need to know how...

Does my question make sense? If so, any help in the correct direction would
be much appreciated.
Sincerely,
Steve
 
P

Paul Overway

In the parent form, place a textbox control (it can be hidden/not visible).
Then in the Form_Current event for the subforms, update the value of the
textbox to the primary key for the subform record. Then set the link master
field for each of the subforms to the name of the textbox on the parent form
and the child field as the actual field for the primary key in the subform.

It isn't clear to me how the data in the parent form relates to that in the
subform, but you may need to set some default value for the textbox. If the
primary key in the parent form existed as a foreign key in the table for the
subforms, you could just use that and skip the textbox.
 

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