Make a backup copy of your database first!
Click the menu TOOLS - Analyze - Documentor. Select Forms - Switchboard.
Click on Options and select only Code. Run and view in MS Word. Scroll down
until you see something like this. It list the command you can run from the
switchboard.
77 Private Function HandleButtonClick(intBtn As Integer)
78 ' This function is called when a button is clicked.
79 ' intBtn indicates which button was clicked.
80
81 ' Constants for the commands that can be executed.
82 Const conCmdGotoSwitchboard = 1
83 Const conCmdOpenFormAdd = 2
84 Const conCmdOpenFormBrowse = 3
85 Const conCmdOpenReport = 4
86 Const conCmdCustomizeSwitchboard = 5
87 Const conCmdExitApplication = 6
88 Const conCmdRunMacro = 7
89 Const conCmdRunCode = 8
90 Const conCmdOpentableEdit = 9
91 Const conCmdOpenFormView = 10
92 Const conCmdOpenFormData = 11
93
94 ' An error that is special cased.
95 Const conErrDoCmdCancelled = 2501
96
97 Dim dbs As Database
98 Dim rst As Recordset
99
100 On Error GoTo HandleButtonClick_Err
Open the table named Switchboard Items and add to the table. The first two
fields are for the screen number (SwitchboardID) and button number
(ItemNumber). Third field is the label for the button. The number of the
command goes in the Command field and the name of your query in the Argument
field.
Make sure to test all buttons and wait awhile before you toss the backup copy.