I am a strickly self taught user so please look past my incorrect verbage of
access.
I am also not sure of your capabilities with access, so I will assume your a
beginner.
The following works for me...
1 First create a unbound combo box with two columns.
2 Using the wizard you will select "I will type the values I want"
3 The first column should have the name of each tab (usually Page272,
Page273
and ect.)
4 The second column should be whatever refence you want to name the
tabs.(Employees Page, Managers Page, Vendors Page)
5 When you hit next in the combo wizard, you will select Col1 as the bound
column.
6 Now it will ask you to name it, for the purposes of the following code,
use "TabControl" Confirm that its name is TabControl when you are done
creating the combo box or the code will not work
7 Open the properties of the combobox and change the column width to 0, so
it only displays the reference column.
8 Type the following on the combobox's afterupdate event "=GoToTab()"
9 Lastly: Create a module by copying and pasting the following code and save
Let me know how it works out
Function GoToTab()
On Error GoTo GoToTab_Err
If (IsNull(Screen.ActiveControl)) Then
Exit Function
End If
TempVars.Add "GoToTab", "[Screen].[ActiveControl]"
If (CurrentProject.IsTrusted) Then
Screen.ActiveControl = Null
End If
DoCmd.GoToControl TempVars!GoToTab
TempVars.Remove "GoToTab"
GoToTab_Exit:
Exit Function
GoToTab_Err:
MsgBox Error$
Resume GoToTab_Exit
End Function
Tammy said:
Hi,
I'm not sure if this can be done, but I have a user who has a tab control
with many tabs. Instead of having to use the "next" and "previous" buttons of
the tab control to navigate between tabs, is there a way to add a "menu" of
some kind that they can display to get a list of tabs, and when a selection
is made, it will jump them to that tab?
We are using Access 2007.
Thanks for any suggestions!