Referring to textbox on Tabbed Control

J

jonefer

Please remind me how to refer to a control on a tabbed pag

For example:
I have a rectangle that I want become visible on the main form's current event depending on another controls value. Both controls are on the Tabbed control

I usually would write the code like this

Sub Form_Current (
if me.YesNoChkBox = -1 the
ContactRectangle.visible = fals
els
ContactRectangle.visible = tru
end i

How do I write this same code if the ContactRectangle is on Tab1 of a tabbed control called "ContactTabs" ?




End su
 
G

Graham Mandeno

You don't have to change anything. Controls on a tab page are still members
of the form's Controls collection, as well as being members of the tab
page's Controls collection, so you can refer to them either way.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

jonefer said:
Please remind me how to refer to a control on a tabbed page

For example:
I have a rectangle that I want become visible on the main form's current
event depending on another controls value. Both controls are on the Tabbed
control.
I usually would write the code like this:

Sub Form_Current ()
if me.YesNoChkBox = -1 then
ContactRectangle.visible = false
else
ContactRectangle.visible = true
end if

How do I write this same code if the ContactRectangle is on Tab1 of a
tabbed control called "ContactTabs" ??
 

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