Can't find the field 'frm_Test2" referred in your expression.

B

bsm

Hi,

This question was asked many times and answered too. But none of them
rectify my issue. Plz help me.

In my parent form I have two sub forms. In Button click event of Main
Form I am accessing the Sub Form Control value. But it doesn't work.

Debug.Print Forms!frm_MainForm.Controls!frm_Test2!VS_Type.Value

Where frm_MainForm is the Parent form, frm_Test2 is sub form and
VS_Type is control of the sub form.

It is very urgent.
 
D

Douglas J. Steele

That should be

Forms!frm_MainForm!frm_Test2.Form.VS_Type

(a . before Form, not a !)

Also, make sure that the name of the subform control on frm_MainForm is
actually frm_Test2. Depending on how frm_Test2 was added as a subform, the
name of the subform control may be different than the name of the form being
used as a subform. It's the name of the control you want.
 
G

Guest

Hi Doug,

You are right i will be punishing myself for that one... Thanks for the
correction.
 

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