Link mainform control to subform

G

Guest

I have a mainform that I would like users to select a record from a combo
box, but no matter what is selected, the subform records do not relate. How
do I link all the records in a multi-tab subform so that it is related to the
record selected in the mainform?

The mainform control, named cboProject, gets it's selections from a query
called qryToBeBid. Do I need to link something in the query or in the
form/subform controls? How do I go about doing this? Thanks in advance for
any feedback!
 
R

Rick Brandt

Kevin said:
I have a mainform that I would like users to select a record from a
combo box, but no matter what is selected, the subform records do not
relate. How do I link all the records in a multi-tab subform so
that it is related to the record selected in the mainform?

The mainform control, named cboProject, gets it's selections from a
query called qryToBeBid. Do I need to link something in the query or
in the form/subform controls? How do I go about doing this? Thanks
in advance for any feedback!

Use the MasterLik and ChildLink properties of the subform control. The
MasterLink would be set to the name of the ComboBox and the ChildLink to the
name of the related field in the subform.
 
G

Guest

Rick Brandt said:
Use the MasterLik and ChildLink properties of the subform control. The
MasterLink would be set to the name of the ComboBox and the ChildLink to the
name of the related field in the subform.
I right click on the control, and open the Properties box, but don't see any
Masterlink or Childlink properties. Am I looking in the wrong place?

Also, I have in excess of 50 controls across a multi tab subform. Do I need
to do this at each control? (Doesn't seem right to me.)

Thanks again!
Kevin
 
R

Rick Brandt

Kevin said:
I right click on the control, and open the Properties box, but don't
see any Masterlink or Childlink properties. Am I looking in the
wrong place?

Make sure you are seeing the property sheet for the subform *Control*, not for
the form contained within. Then the two properties will be found on the data
tab of the property sheet.

Also, I have in excess of 50 controls across a multi tab subform. Do
I need to do this at each control? (Doesn't seem right to me.)

You do this per-subform control.
 
G

Guest

Rick Brandt said:
Make sure you are seeing the property sheet for the subform *Control*, not for
the form contained within. Then the two properties will be found on the data
tab of the property sheet.



You do this per-subform control.
OK...I guess I'm a real dummy. No matter where I click I can't get the
"subform *control* " property sheet you speak of. I assume this is to be
achieved in Design View. I have clicked everything from individual controls
to groups of controls to the entire subform. I guess I don't understand what
you mean by "subform *control* ". I have tried in design view of the main
form, as well as the forms that make up the multi tab subform. No luck...no
Masterlink or Childlink properties. There's something that's just not
registering with me.
What am I missing?
Thanks once again!
Kevin
 
G

Guest

Rick,
I figured it out! Disregard my last post. I know I sounded like an idiot,
and may still be one, but I figured it out nonetheless.
Thanks
Kevin
 
R

Rick Brandt

Kevin said:
Rick,
I figured it out! Disregard my last post. I know I sounded like an
idiot, and may still be one, but I figured it out nonetheless.
Thanks
Kevin

In Access 97 the subform control is just a big white square so it is a lot
easier to get the properties for the control and a lot more obvious (IMO) how
the subform control relates to the main form and is not itself an actual form.

In Access 2000 they "improved" things by letting you see the design view of the
subform inside of the subform control when the parent form is in design view. .
This change just makes things more confusing and many people don't like it.
 

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