subform referencing

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

I have a main form with subform on it with a subform
inside the subform. There is a combo box inside the
subsubform that needs to fill with info depending on what
is selected in a combo box on the subform. I am not
getting it to work. For simplicity call them all;
main form (Main)
subform (Sub1)
subsubform (Sub2)
subform combobox (cboSub1)
subsubform combobox (cboSub2)
Looking for assistance in solving this riddle.
Thanks.
*** John
 
To refer to the ComboBox on the subform, use:

Forms!Main!SubformCONTROL.Form.cboSub1

I am not using "Sub1" since I am not sure whether it is
the SubformControl name or simply the name of the Form
being used as the Subform (more accurately, being used as
the SourceObject of the SubformCONTROL). You will need to
use the SubformCONTRL name.

HTH
Van T. Dinh
MVP (Access)
 
cboSub2 needs to be based on a query and let's say the field named MyField
controls the contents of that combobox. The values returned in MyField then are
determined by what is selected in cboSub1. Put the following expression in the
criteria of MyField:

Forms!Main!NameOfSubformControlOnMain.Form!cboSub1
 
Back
Top