On-Click event on Tab Control

sgtSortor

Registered User.
Local time
Today, 08:58
Joined
Mar 23, 2008
Messages
31
Hi,

I'm using a tab control form which has 8 different tabs. I have a help document and I have a help button on the bottom of the main form. If I click on a tab and go to that page, I want a variable to hold the page number so the help document can look at that variable and know which portion of the help document to bring up.

(Forms!frmHold.TabHold = 1 ) this is my variable.

I've tried

'code'
Private Sub Page1_Click()
Forms!frmHold.TabHold = 1
End Sub
 
Declare a variable on the Form_Load event to hold your number, as well as put the default tab number in that variable.

What you are doing (Form!frmHold.TabHold = 1) - that's not really a variable per se.

So on the Page1_Click Event (make sure that Page1 is the actual name of the tab), you can set a number to that variable. Then the help button can check that variable when you press it. You do not need to put it into a field on your form.
 

Users who are viewing this thread

Back
Top Bottom