View Single Post
  #3  
Old December 15th, 2006, 09:10 AM posted to microsoft.public.access.forms
scubadiver
external usenet poster
 
Posts: 1,673
Default Subforms problem

thanks. It seems to have worked.

I tried doing this before but changed the design to put one form inside the
other. I then decided that it looked too messy!

"Sprinks" wrote:

Scubadiver,

Two subforms on a main form cannot be linked directly. One choice is to
insert one as a subform on the other. The drawback to this is that you can't
insert a continuous subform on another subform.

The solution is to place an unbound textbox, usually hidden, on the main
form, set its ControlSource to the primary key of the first subform, and link
your second subform to it. Assuming the list of queries table or query has a
BranchID field that you can link by, set the following:

ControlSource Expression: =[FirstSubform].Form![BranchIDControl]

Place the second subform on the main form, and set its LinkMasterFields to
the name of the textbox, and the LinkChildFields to BranchID.

Hope that helps.
Sprinks


"scubadiver" wrote:

I have a main form with two separate subforms.

One subform holds branch address info and the other subform holds logged
queries associated with each branch address.

When I change from one branch ID to another, the info in the queries subform
doesn't match up.

An earlier incarnation of my DB did have one subform inside the other but it
looked too confusing.

help!