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

How to move from one tabbed page to another with a command button 1

Status
Not open for further replies.

rew2009

Technical User
Apr 21, 2009
114
US
I have form with ten tabbed pages. I want to move from the first page to the 10th page using a command button rather than the tab control at the top of the form. How can I do it? Below is the code from the command button created by the wizard. Thanks Russ

Private Sub cmdGoToPage10_Click()
On Error GoTo Err_cmdGoToPage10_Click


Screen.PreviousControl.SetFocus
' DoCmd.FindNext

Exit_cmdGoToPage10_Click:
Exit Sub

Err_cmdGoToPage10_Click:
MsgBox Err.Description
Resume Exit_cmdGoToPage10_Click

End Sub
 
You want the 10th page of the Tabcontrol to be on focus right?
Code:
Private Sub Command6_Click()
    Me.TabCtl0.Pages(9).SetFocus
End Sub
or
Code:
Private Sub Command6_Click()
    Me.TabCtl0.Pages("PageName").SetFocus
End Sub


Zameer Abdulla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top