Page-Index of a Tab-Control from a SubForm

  • Thread starter JoeProvenzale via AccessMonster.com
  • Start date
J

JoeProvenzale via AccessMonster.com

I am writing a small golf management database application.
I have a form (TournamentManagement) which has a 3 page tab-control
(TournamentTabCtrl).
The second page has a subform (Groups) which includes a tab-control
(SubFormTabGroupCtrl) with 6 pages.

I need to know the page-index of the main tab-Control (TournamentTabCtrl)
from the first page of this tab control..

How can this be done?



Thanks in advance
 
A

Allen Browne

The Value of the tab control indicates the PageIndex of the page that has
focus.

So, use an expression like this:
=[Form].Parent![TournamentTabCtrl]
or in VBA code:
Me.Parent!TournamentTabCtrl
 
J

Jeanette Cunningham

The tab control has a value that is equal to the number for the currently
selected page.
Note that the page numbering starts at 0.
If you are on the first page, the tab control has a value of 0.

So your code can go

Select Case Me.TournamentTabCtrl
Case 0
'code here

Case 1
'different code here

Case Else
'other code here
End Select


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

JoeProvenzale via AccessMonster.com

Thanks very much. It was easier than I had imagined.

Allen said:
The Value of the tab control indicates the PageIndex of the page that has
focus.

So, use an expression like this:
=[Form].Parent![TournamentTabCtrl]
or in VBA code:
Me.Parent!TournamentTabCtrl
I am writing a small golf management database application.
I have a form (TournamentManagement) which has a 3 page tab-control
[quoted text clipped - 8 lines]
Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top