Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access a field of Main Form from a SubForm 1

Status
Not open for further replies.

matrec

Technical User
Feb 19, 2005
19
CY
Hi, I have a main Form called "frmMain" and a subform called "subFrm", there common field is NotNo.
How can I check that a text field called "eacNo", which belongs to "frmMain" is Null, from the on-entry event of field "fName" of the subform "subFrm" ?
I have tried

if Len(Forms!frmMain!eacNo)=0
but the error messages says that frmMain cannot be found.
Any clues to solve the problem ?
Thank you
 
The easiest way is to use the "parent". So to check the status of the control eacNo on the main form from the subform you would type (within the subform):

isnull(me.parent.eacno)
 
Thanks BSman.
Solved the problem
Rgds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top