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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabbing Across Tabs 1

Status
Not open for further replies.

Sethington

Technical User
May 16, 2006
34
US
I have a form that is using 10 different tab pages. I want to be able to tab to each tab. What I mean is once I get to the end of my first page by tabbing it will move to page 2 instead of looping back to tab index 0 on that tab page.

Any suggestions?
 
One way would be in the On Exit sub for the last control on your first page set the focus to the next page.

Where LastControlName is the name of the last control on the first page:

Private Sub LastControlName_Exit(Cancel As Integer)
SecondPageName.SetFocus
End Sub

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
[tt] me!mytab.pages(1).setfocus[/tt]

or
[tt]me!mytab.pages("SecondTab").setfocus[/tt]


________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Your code worked great thanks. I couldn't use "Me" though because when you have tabs and subforms you have to refer to the main form so my code looked like this.

On Lost Focus

Forms![mainForm]!myTab.Pages(1).SetFocus

 
I couldn't use "Me"
Even like this ?
Me.Parent.myTab.Pages(1).SetFocus

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top