The .Value property of the tab control is equal to the index of the currently selected tab page (starting from zero). So, for example, the following snippet of code behind a command button will reveal the currently selected tab page:
Code:
Dim iMyInt As Integer
Dim strMyString As String
iMyInt = Me!TabCtl0.Value
strMyString = Me!TabCtl0.Pages(iMyInt).Caption
MsgBox strMyString & " is the currently selected tab page."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.