Applecore Pages on Microsoft Access

Detecting when a Tab Control changes

If you are using a tab control on a form, you might wish to know which tab you are currently on. You can get this by using:

Me!tab1.Value

You might also wish to know when the user has changed tabs. Rather than using the Page OnClick event for this, you would use the OnChange event for the Tab Control itself:

Private Sub tab1_Change()
    Select Case Me!tab1.Value
        Case 0
'           On first page of tab control
        Case 1
'           On second page of tab control
        Case 2
'           On third page of tab control
    End Select
End Sub

Notice that the pages are 0-indexed, so that the first page has a value of 0.

Top

 


HOME | NEW | TABLES | QUERIES | FORMS | REPORTS | GENERAL | API | DOWNLOADS | TUTORIAL | RESOURCES
E-MAIL
Copyright & Disclaimer

 

Last modified at 06/06/2006 14:54:52