Accessing a field in main form from subform

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi,

I am trying to check the value of a field that is in the
main form, but I am trying to check this field from the
subfrom position.
After any updated in the subform, I want to check field
Serial Number(which is in the main form).
I tried:

frm_Main.Form.SN
frm_Main.Form!SN
Me!SN

But none have worked.

Thanks.
 
When referencing across open forms, you must always specify
the Forms collection e.g.

Forms!frmMain!SN

Hope This Helps
Gerald Stanley MCSD
 
Dan said:
I am trying to check the value of a field that is in the
main form, but I am trying to check this field from the
subfrom position.
After any updated in the subform, I want to check field
Serial Number(which is in the main form).
I tried:

frm_Main.Form.SN
frm_Main.Form!SN
Me!SN


A subform can refer to its main form using the Parent
property:

Parent.SN or Parent!SN or Me.Parent.SN or . . .

To get to any form (not a subform), you can use the Forms
collection:

Forms!formname.SN
 
Back
Top