From: JoeProvenzale via AccessMonster.com on
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1

From: Allen Browne on
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"JoeProvenzale via AccessMonster.com" <u58538(a)uwe> wrote in message
news:a47ac93c34f45(a)uwe...
> 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
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
>
From: Jeanette Cunningham on
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

"JoeProvenzale via AccessMonster.com" <u58538(a)uwe> wrote in message
news:a47ac93c34f45(a)uwe...
>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
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
>


From: JoeProvenzale via AccessMonster.com on
Thanks very much. It was easier than I had imagined.

Allen Browne wrote:
>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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1