Tab form on click event


How do I get the on click event to work on a TAB Form. As a test I entered msgbox("Something"). but when I click the tab I don't get the message. Looking at some E.E questions & answers, "On Change event" is mentioned but I can't find. I am working on access 2003 at the moment. Any help most appreciated

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi try this where TabCtl0 your tabcontrol name

Private Sub TabCtl0_Change()
If Me.TabCtl0.Value = 0 Then 'First Page
  'Do code for Page 1
ElseIf Me.TabCtl0.Value = 1 Then 'Second page
  'Do code for Page 2
ElseIf Me.TabCtl0.Value = 2 Then 'Third page
  'Do code for Page 3
End If
End Sub

Open in new window

Or with case

Private Sub TabCtl0_Change()
  Select Case TabCtl0
    Case 0  'First Page
      'Code for Page 1
    Case 1  'Second page
      'Code for Page 2
   Case 2   'Third page
     'Code for Page 3
  End Select
End Sub

Open in new window

chesteraAuthor Commented:

Where do I find tab change. I have looked

chesteraAuthor Commented:

Yes I see My tab is called Site and the second tab so it's page 1. Do  I place the code in  the click event of the tab called Site

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Well, if i remember correctly


go to  Design View


right click on tablcontrol --> Properties


In the property sheet (usually open on the right of the screen) select the tab control if not selected


Select Event Tab


press the [...] button next to change event

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chesteraAuthor Commented:

I am looking at 2003 and I don't have the change event. But I can work it out from here many thanks for your help

chesteraAuthor Commented:

I have closed this question so hope you don't mind asking another question. I have a copy of access 2013 even in this version Tab/Property there are Click, Doubleclick, Mouseup and mouse down events can't find the Change event

chesteraAuthor Commented:

I have finally worked it out. Use the form change Change event not the tab.
With the rest of you info it's working. Once again thank you for your help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.