Query in Combobox problems

  • Thread starter Thread starter jeff klein
  • Start date Start date
J

jeff klein

I have two comboboxes on a subform. The first shows a list of "Programs"
and the second has "Program Items". Depending on the program selected in
the first combobox, the second will show only Program Items for that
program. Both Programs and Program Items are sourced to thier tables. When
I run the subform and scroll through the records everything works great.
But when I run the main form and scroll records all the program items are
blank. Any ideas
 
My guess is that the cboProgramItems has a parametrised Query / SQL as the
RowSource with the reference to the cboPrograms as the Parameter. It is
likely that the reference is correct when you use the Form as a stand-alone
Form but incorrect as the Subform. You probably need to have the full
refernce to the cboPrograms for it to work correctly, something like:

Forms!Mainform!SubformCONTROL.Form.cboPrograms

Note that the name of the SubformCONTROL may be different from the name of
the Form being used as the Subform (or more correctly, being used as the
SourceObject of the SubformControl).
 
Thats it!...thanks for the reply
Van T. Dinh said:
My guess is that the cboProgramItems has a parametrised Query / SQL as the
RowSource with the reference to the cboPrograms as the Parameter. It is
likely that the reference is correct when you use the Form as a stand-alone
Form but incorrect as the Subform. You probably need to have the full
refernce to the cboPrograms for it to work correctly, something like:

Forms!Mainform!SubformCONTROL.Form.cboPrograms

Note that the name of the SubformCONTROL may be different from the name of
the Form being used as the Subform (or more correctly, being used as the
SourceObject of the SubformControl).
 
Back
Top