Tab Control On Click Event Help

GregSmith

Registered User.
Local time
Today, 00:13
Joined
Feb 22, 2002
Messages
126
I have a tab control box with 3 tabs.
Names: Network, Services, Resources.

When you click the Services tab, it should auto hide some fields on the form.
The thing is, you have to click a 2nd time in the tab control box for it to work.

Is there a way to have it automatically hide the fields when you select the services tab?

Is there a system wide function that is always monitoring your clicks to see what is happening??

Any code examples or hints would be great. :cool:

Thanks, Greg
 
Use the OnChange event for the tab control and not for one of its pages.
 
Ok, I found what you are talking about and can get things to happen. :)
Now the problem is, I cannot seems to find the correct code to tell me what tab page I am on.

This is what I am using:

If Me.TabCtl111.Pages = "Services" Then
MsgBox "true"
Else
MsgBox "False"
End If

But it produces an error. Is the me.tabctl111.pages = "services" correct?
Any ideas??

Mile-O-Phile said:
Use the OnChange event for the tab control and not for one of its pages.
 
If Me.TabCtl111 = "1" Then ... does the trick!

0 is page 1
1 is page 2
2 if page 3

and so on.

Thanks for all the help in pointing me in the right direction!! :D
 

Users who are viewing this thread

Back
Top Bottom