I have created a custom menu and want to attach a macro to it. After going
to tools, customize, I right-clicked on the menu item and chose properties.
There is a place to choose a macro in this box.
However, I need a macro to run the following code:
On Error Resume Next
DoCmd.SelectObject acReport, Screen.ActiveReport.Name
DoCmd.RunCommand acCmdPrint
I have tried to use RunCode in the macro action, but it is looking for a
function, which I am not using. Is there another way to achieve this? I am
explaining this the best way I know how. Any help would be greatly
appreciated!!
Make that VBA code into a function, then call it.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
>I have created a custom menu and want to attach a macro to it. After going
> to tools, customize, I right-clicked on the menu item and chose
[quoted text clipped - 12 lines]
> explaining this the best way I know how. Any help would be greatly
> appreciated!!
Sarah0824 - 25 Jul 2007 02:48 GMT
I've tried (with my limited knowledge), but I don't know enough about VBA to
make it into a function. I wasn't sure what arguments to put in for the
function. Can you help me?
> Make that VBA code into a function, then call it.
>
[quoted text clipped - 14 lines]
> > explaining this the best way I know how. Any help would be greatly
> > appreciated!!