[AccessD] Open a form in datasheet mode from switchboard

Michael Welsh mike at welshfam.org
Mon Aug 23 20:02:34 CDT 2004


 Arthur,

I alter the code in the menu for the switchboard's HandleButtonClick
Function"

'Add Constant the list
Const conCmdOpenFormDataSheet = 2

Then under the Select Cases add a new case:
  Case conCmdOpenFormDataSheet
    DoCmd.OpenForm strMenuArgument, View:=acFormDS

You will have to look for the "strMenuArgument" that is being used in the
code. I have forgotten what variable that the original code used. It will be
the same as the other cases.

Then in the menu table, use 2 for the Command.

Mike


-----Original Message-----
How do I open a form in datasheet mode from the standard switchboard?
What I CAN do is write a one-line sub and call it instead:

    DoCmd.OpenForm "Position_frm_ds", acFormDS

This works fine, but it seems pointless to write a one-line sub that
executes this. Can I avoid this and somehow pass a parameter to the "Open
Form in Edit Mode" option instead?

No big deal, really. I just have to write a one-liner, and I already have,
but still it seems a bit stupid to do so.

TIA,
Arthur




More information about the AccessD mailing list