Referencing a field in a subform

J

JohnB

Hi.

I have a command button on the bottom of a form and I need to be able to
modify the code in it to reference a combo in the forms subform. The trouble
is, the main form is itself a subform on a Tab Control and I can't get it to
work. Here's the detail - sorry it's a bit complicated:

The main forms Subform Control Name on the Tab page is frmSECMentors.
The Source Object (the form name) is also frmSECMentors.
The main form has a subform whose Subform Control Name is SubSECMentorSchool.
The Source Object (subform name) is frmSECMentorSchoolSubform.
The combo on the subform is called cboMentor School.

I want to check if cboMentorSchool has content, using If Not IsNull
(......). Can anyone help me reference cboMentorSchool?

Thanks, JohnB
 
J

JohnB

Thanks Roger.

I'll keep a copy of that handy. I've had a look and I'll be trying this out
tomorrow but, for now, can I assume that I treat the Tab Control as the top
level form? If so, I believe my reference would be:

Forms!TabCtrl1!frmSECMentors.Form!SubSECMentorSchool.Form!cboMentorSchool

Thanks again for the help. JohnB
 
J

JohnB

I've tried that now and got it to work fine, with your latest suggestion.

Thanks for the help.

JohnB
 

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