Printer dialog box in command in menu or toolbar

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.
 
A

Albert D.Kallal

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()
 

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

Top