Printer Dialogue Box

Topher

Registered User.
Local time
Today, 14:24
Joined
Apr 18, 2000
Messages
72
I'd like to know how i can print a report but by using the printer dialogue box. how can i bring it up and let the box control how many reports are printed, and where its being printed.....

i know of the docmd.runcommand accmdprint option brings up the dialgue box but how to i use it with a report?

any suggestions??

Topher
 
Did you manage to find the solution? If so could you please let me also know.
Regards
Charley
 
The only thing i could figure out was using the docmd command funtion after opening the report in the background. so use the open report in a preview mode and then the command for the printer dialgue box. also i had to use setwarnings false before using the command so access wouldn't bring up a dialgue box when i hit cancel. thats all i could figure out - i know it can be done thru VBA in a better manner but im unsure how.
 
the code in that article shows you hot you can print the doc thru code. but what we want to do is actually bring up the printer dialogue box. such as the one that comes up when you print from Word. i belive you can make your own by grabing the data using the commands in that article but there must be a more time saving way such as a default printer dialogue box.
 
From your form use the following code in an event to open the report:

DoCmd.OpenReport "YourReport", acViewNormal
(YourReport needs to be the actual name of your report)

Then in the report add the following code to the report's On Activate property:

DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, Me.Name

This will bring up the Print Dialog box to give you your choices, print your selections and close the report, without you viewing the report.

Good Luck,
RDH

[This message has been edited by R. Hicks (edited 05-23-2000).]
 
Thanks for the info - i tried what you said and it does print however the dialogue box doesnt appear. i think its because of using the normal mode for opening the report - normal means to print it, right? i replaced the acViewNormal with acViewReplace and it worked!!!

=D

Thanks!
 
sorry i meant acViewPreview not acViewReplace!

oops
 

Users who are viewing this thread

Back
Top Bottom