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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Open datasheet view from switchboard 2
Access Switchboard error message 1
I've lost my Switchboard ! 3
Controlling another switchboard 2
Switchboard Questions 2
Switchboard Minimized 4
switchboard problem 4
switchboard question 3

Back
Top