subform referencing

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
 
V

Van T. Dinh

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)
 
P

PC Datasheet

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
 

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