subform question

L

Lauren B

I have a subform within a form (linked by a common customer ID) that has a
series of combo boxes.

The first set of combo boxes has a list of vendors, the second set of combo
boxes has list of products. The combo boxes are controlled so that only the
products for each particular vendor appear in the second set of combo boxes
based on which vendor the use selects in the first combo box.

Each combo box is controlled by a query. The first combo box draws directly
off of the vendor field. The second combo box is set to display the product
field with the following in the vendor column: [Forms]![SUBFORM1]!VENDOR1]

This method works when the subform is open on its own. However, when I use
it as a subform within a form, I get a popup asking for a parameter value.

Why will the combo boxes only work properly when the subform is free
standing? What do I need to do to remedy this problem?

Any assistance is greatly appreciated.

LB
 
M

Marshall Barton

Lauren said:
I have a subform within a form (linked by a common customer ID) that has a
series of combo boxes.

The first set of combo boxes has a list of vendors, the second set of combo
boxes has list of products. The combo boxes are controlled so that only the
products for each particular vendor appear in the second set of combo boxes
based on which vendor the use selects in the first combo box.

Each combo box is controlled by a query. The first combo box draws directly
off of the vendor field. The second combo box is set to display the product
field with the following in the vendor column: [Forms]![SUBFORM1]!VENDOR1]

This method works when the subform is open on its own. However, when I use
it as a subform within a form, I get a popup asking for a parameter value.

Why will the combo boxes only work properly when the subform is free
standing? What do I need to do to remedy this problem?


You have a misperception here, subforms are not open forms.
They are just being displayed by the subform control.

Change your reference in the query to something like:

Forms!mainform.subformcontrol.FORM.Vendor1
 

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