Custom menu to print

zorplex

New member
Local time
Today, 10:42
Joined
Feb 18, 2005
Messages
7
I want to create a custom menu or toolbar which opens the print dialogue box when pressed. i.e it opens the dialogue that allows the user to select a particular printer, specify number of copies etc.

All I have been able to do using the customise toolbar function (View > Toolbars > Customise) is add a print button which prints the form\report straight away.

I don't want to keep the full "File" default menu showing but do want the "Print..." functionality that this menu has.

The database is Access 97. Thanks in advance!
 
The RunCommand acCmdPrint brings up the print dialog box. Use that in your custom toolbar.

DoCmd.RunCommand acCmdPrint
 
How to attach code

Thanks. How do I attach code to a button?
 
Create you button on your form. Open the event procedure and put the code in.

Private Sub cmdOpenPrintDialog_Click()
DoCmd.RunCommand acCmdPrint
End Sub

This has no error trapping. If you want error trapping, I suggest you let the wizard create your button, then take out the lines of code you don't need and replace them with the DoCmd line.
 

Users who are viewing this thread

Back
Top Bottom