Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting Subforms 1

Status
Not open for further replies.

skriseman

Technical User
Sep 21, 2002
8
US
I created form A with a tab control in the body. On one of the tabs, I created subform B and subform C. I want to filter the data in subform C to reflect only the highlighted row in subform B. Thanks for the help.
 
Skriseman.
Are either subform B or subform C related to form A? In other words have you set a parent-child relationship between A and B or A and C?

If NO relationship exists between A and either B or C, then make C a subform of B setting the relationsip and then drop form B on the tab of A.

Jdemmer
 
This is actually a very useful trick. Here's how I did it, which I'm sure I learned from someone else:

-The driven form, form C in your case, is going to be linked to an unbound text box control on the main form. This control will be the "Link Master Field" on the subform control, while the relevant field in the subform will be the "Link Child Field".

-The driving form, form B, will have one line of code in its Current event, which sets the unbound text box on the parent form equal to the value in the relevant field on the driving form. In my case it's this:
Me.Parent!txtDiscrepancyID = Me!txtDiscrepancyID

That's really all it takes, and it's a very powerful tool.

Jeremy Wallace
AlphaBetCityDataworks.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top