Switchboard items - Commands list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Trying to find where to enter code to have a form open in datasheet format.
Have code to enter, but can't locate where to enter. Have opened switchboard
in design and then clicked on Code but can't find the comman list to add to.

Lin
 
WARNING Will Robinson
- Backup the database before attemping any editing in the switchboard code.

Look for the list like this ---
Private Function HandleButtonClick(intBtn As Integer)
' This function is called when a button is clicked.
' intBtn indicates which button was clicked.

' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8
Const conCmdOpentableEdit = 9
Const conCmdOpenFormView = 10
Const conCmdOpenFormData = 11

And then the command lines for each ---
Select Case rst![Command]

' Go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" &
rst![Argument]

' Open a form in Add mode.
Case conCmdOpenFormAdd
DoCmd.OpenForm rst![Argument], , , , acAdd

' Open a form.
Case conCmdOpenFormBrowse
DoCmd.OpenForm rst![Argument]

' Open a form-view.
Case conCmdOpenFormView
DoCmd.OpenForm rst![Argument], acNormal

' Open a form Datasheet
Case conCmdOpenFormData
DoCmd.OpenForm rst![Argument], acFormDS
 
Back
Top