Combo box row source on subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform with 3 combo boxes, representing a hierarchy of menus.

The row source for the 2nd is filtered by the first, and the row source for
the third is filtered by the value in the 2nd. I accomplish this by
referring to the appropriate combo boxes in the queries underlying the 2nd
and 3rd combox.

I use a macro to requery the 2nd and 3rd when the 1st is changed, and to
requery the 3rd when the 2nd is changed.

This all works just fine when I have the form open directly. This form is
to be used as a subform, however, and when using the combo boxes when
accessing the form as a subform, the query cannot "see" the form on which the
controls are based.

Is there some way to refer to controls on a form that is open as a subform?
 
Chris said:
I have a subform with 3 combo boxes, representing a hierarchy of menus.

The row source for the 2nd is filtered by the first, and the row source for
the third is filtered by the value in the 2nd. I accomplish this by
referring to the appropriate combo boxes in the queries underlying the 2nd
and 3rd combox.

I use a macro to requery the 2nd and 3rd when the 1st is changed, and to
requery the 3rd when the 2nd is changed.

This all works just fine when I have the form open directly. This form is
to be used as a subform, however, and when using the combo boxes when
accessing the form as a subform, the query cannot "see" the form on which the
controls are based.

Is there some way to refer to controls on a form that is open as a subform?


The query criteria needs to use a reference like:

Forms!mainform.subformcontrol.Form.combobox
 
Back
Top