Link Two Subforms on a Main Form

C

channell

I apologize for repeating what others have already asked (and even myself),
but I am not making too much sense in what was relayed to other posters. I
thank you for your help.

I have a Main Form (FormA). I have to Subforms (sFormA) and (sFormB).
sFormA and sFormB Both pull from the same Query. They are almost identical
except sFormA is Single Form View, and sFormB is Continuous Form View.

I need, when I select a record from sFormB (Continuous Records), for sFormA
to display the corresponding record. Now, I have is set so when I do select
a record, the subform opens as a new window and displays what I need. I
don't want it to open a new window, I just want it to open up on the existing
form (as a subform).

I know I need to give you some information, so here it is:

The main form and the subforms are related by EmployeeID. The two subforms'
ID is DAILYINFO_ID

I appreciate your help so much!! Thanks everyone!

-Scott Channell
 
J

Jeanette Cunningham

Hi channell,
put an unbound text box on the main form and call it Link

Set sFormA's controls -->
LinkMaster -- Link (the text box on the main form)
LinkChild -- EmployeeID

On sFormB put code on its current event -->
Parent.Link = Me.EmployeeID

Every time that users move to a different record on sFormB, Link changes to
the same value.
sFormB will move to the record with the EmployeeID shown in Link on the main
form.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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