Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Tab control

Status
Not open for further replies.

mtompkins

IS-IT--Management
Jan 14, 2003
166
US
Sorry for this one - just can't remember.

I need to detect which of 3 tabls is current the active tab -

Can someone kick start my memory please.

For example -

If Me.TabCtl0.Pages(1).setfocus = True

But this doesn't work - as I knew it wouldn't

Thanks.
 
I'm thinking you might want to try coding the OnClick event of each page to pass a value to a hidden field, and go from there...
 
OK, sorry, I meant to say the OnChange event of the tab itself ;)
 
Hi
Did you mean as returned by (?):
MsgBox Me.TabCtl0.Pages(Me.TabCtl0.Value).Name
 
2nd half -

I need to reference this from the report so I can't use Me...

I've tried:

Forms!frmMenu.Form.TabCtl0.Pages(Forms!TabCtl0.Value).Name = "Page1"

and I know I'm close -

Please help.

Thanks.
 
Hi
If I create a report with two text boxes (bit lazy with naming here) ...
Text0
=[Forms]!form1!tabctl0.Value
Text1
=[Forms]![form1]!tabctl0.Pages([Text0]).[Name]

When I select Page 1 of TabControl0 on Form1, Report Text0 = 0, Text1 = Page1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top