Printer dialog box in command in menu or toolbar

  • Thread starter Thread starter Alex Martinez
  • Start date Start date
A

Alex Martinez

Where do I put the printer dialog code?

DoCmd.DoMenuItem 1, 0, 10

I have never coded in the menu or tool bar? All I want is to have a
printer dialog box in the File menu. If anybody can help I will
be appreciated. Thank you in advance.
 
For the code that pops up the printer dialog (so the user can change
printers etc).

You can use:

DoCmd.RunCommand acCmdPrint

Most (if not all) of my custom menus call code. The way you do this is
create a public function (a standard module is a good place to put this).

Public Function ShowPrinter

DoCmd.RunCommand acCmdPrint

end function


To call code from a custom menu, you put the name of the function in the "on
action" property of the menu button


So, while in menu design mode, right click your custom menu item, and select
properties...then in the "on action" setting, you put:


=ShowPrinter()
 
Back
Top