Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print dialog box from toolbar

Status
Not open for further replies.

medic133

Technical User
Apr 7, 2002
86
US
I have a report that I would like to have only one toolbar on it. On one of the buttons on the toolbar I would like to be able to open the print dialog box as it appears when you click File-->Print. I want to restrict the number of options available to the user as this db will be used by db illiterate persons (as if I'm not). I have been able to create a custom toolbar and place the "Print" icon button on it, but, when clicked, it prints immediately to the default printer. I want the user to be able to choose which printer to use as there are several printers in my work area, both black and white and color, that could be used. I have read in some of the forums about "commondialog" and "showprinter method" but have no idea what they are referring to and can't seem to find these topics in any help section. Any help would be great! Thanks in advance!
 
Now I've gotten a little bit farther. I have created a custom toolbar and put a custom button on it. With the "Customize" dialog box open, I right-click on the custom button on my custom toolbar and go to Properties on the submenu. In the Properties box, there is a place to put a custom function. This is where I'm stuck. I don't know where to write this function. I'm pretty sure I know the VBA code for opening the Print dialog box (DoCmd.RunCommand acCmdPrint), but I don't know where to put this code. Any help would be appreciated.

Also, is there a way I can put the standard printer icon on this custom button? The selections I have from the above submenu do not include this image. Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top