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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I refere to controls on a tab control?.

Status
Not open for further replies.
Mar 18, 2002
122
US
Hello All,

How Do I refere to Controls on a tab page?. I have Tab Control named "TabCtl1" on "OutEmp1" Form. The "TabCtl1" has three tabs "Class","General",and "ALternate ID". If I click "Class" tab, it shows "OutClass1" subform. If I click "General" tab it shows "OutGeneral1" subform. Now I need to refere controls on "OutClass1" subform from "OutGeneral1" subform. What is the syntax for this?. Please help me on this problem ASAP.

Thanks,
R.
 
Hi!

Controls on a tab control can be referred to as if they are directly on the main form. Me!ControlName should work. Controls on a subform are different, to refer to them use the following syntax:

Me!SubFormName.Form.Controls(ControlName)

hth
Jeff Bridgham
bridgham@purdue.edu
 
Hello Jeff,

I used your syntax and got below error

"Run-time error'2465'"
"AED (Application NAme) cann't find the field "QR" (field Name) referred to in your expression."

THe code I used is

If IsNull(Me![OutEMPAC Class Subform].Form.Controls([QR_CODE1])) Then
MsgBox ("TAB CLASS.")
End If

Please help me on this problem.

Thanks,
R.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top