refer to controls on tabbed form

jrmywvr

Registered User.
Local time
Today, 05:32
Joined
Jan 8, 2003
Messages
10
I can't seem to make this work. I have a new form with several checkboxes on several pages linked to an existing table. I'm using the following code in the On Load even of the form to activate textboxes that correspond to the checkboxes:

If Me!chkSomething= -1 then
Me!txtSomething.enabled=true
Else
Me!txtSomething.enabled=false
End If

This works for the checkboxes on the active page of my form but not any of the others. I've tried using Me!TabCtl!Pages(1)!chkSomething where TabCtl is the name of the Tab Control and (1) is the Page Index of the page with my checkbox.

What is the correct way to refer to controls on other pages in a tab control?
 
Hi jrmywvr,

I'm not that clear on what exactly your problem is but hope this helps:

1. To enable the Tab control in my database I used the following line of code:

Me.TabCtlReadings.Enabled = True

This, by the way, enables all the controls in the Tab control ( I have them disabled).

2. Now, what is the correct way to refer to controls on other pages in a tab control? Just the same way you would to refer to other controls. "Me.YourControl....." It works for me.

Regards,

George
 
Thanks for your help. I had tried referring to these controls using Me.Control and had gotten an error message and I assumed the error was about these references. But it is working now--thanks!
 

Users who are viewing this thread

Back
Top Bottom