Question Change Tab set focus on click

DanJames

Registered User.
Local time
Today, 05:44
Joined
Sep 3, 2009
Messages
78
1)I have a listbox (List51) and a Tab Control (TabCtl13) with two tabs: the first "Clients" and the second "All Info". I want to be able to change the tab from Clients to All Info when a record is selected on List51.

2)Another thing I would like is.. I have a button on another from with the code:

On Error GoTo Err_Command21_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "All Client Details"

stLinkCriteria = "[ClientID]=" & Me![ClientID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
'MABEY ADD CODE HERE TO CHANGE THE TAB TO "ALL INFO"
Exit_Command21_Click:
Exit Sub
Err_Command21_Click:
MsgBox Err.Description
Resume Exit_Command21_Click

End Sub

This code finds the details on the form but I would like it to change to the tab "All Info" aswell. I thought mabey add the answer to question 1 under the code.

Thanks alot, and any answers to the two questions would be great!
Dan.
 
Me.TabControlName.Pages.Item("PageName").SetFocus
 
Thanks alot!!
 

Users who are viewing this thread

Back
Top Bottom