reference in subform

G

Guest

Hi

I have create a form with two combo box synchronize.
One combo box for select category
secon combo box for product in the category by setting the data source
category to = [forms]![myform]![category]. My problem this work by itself
but when I put this form in anotherform as a subform this doesn't work.

Please help

many thanks in advance
 
W

Wayne Morgan

The path to a control on a subform is

Forms!NameOfParentForm!NameOfSubformControl.Form!NameOfControlOnSubform

add the brackets as needed, depending on where you use this. The
"NameOfSubformControl" is the name of the control on the main form that
holds the subform. This is the same control where you set the Parent/Child
link fields.

Where the problem comes in is that when a form is opened as a subform, it is
considered to be part of the parent form, it isn't open as a form in its own
right.
 
G

Guest

Thanks Wayne

Wayne Morgan said:
The path to a control on a subform is

Forms!NameOfParentForm!NameOfSubformControl.Form!NameOfControlOnSubform

add the brackets as needed, depending on where you use this. The
"NameOfSubformControl" is the name of the control on the main form that
holds the subform. This is the same control where you set the Parent/Child
link fields.

Where the problem comes in is that when a form is opened as a subform, it is
considered to be part of the parent form, it isn't open as a form in its own
right.

--
Wayne Morgan
MS Access MVP


hngo said:
Hi

I have create a form with two combo box synchronize.
One combo box for select category
secon combo box for product in the category by setting the data source
category to = [forms]![myform]![category]. My problem this work by itself
but when I put this form in anotherform as a subform this doesn't work.

Please help

many thanks in advance
 

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