I am trying to figure out how to show the print dialog before sending a report to print. After an hour, I'm sending out for pizza and help. Is there a simple way to do this?<br><br>TY,<br>Drew
not, do you live in Florida I'll be over for some Pizza. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
Thank you for responding, Doug. I've gone thru your faq, and I think what I'm looking for is a little different.<br><br>I was hoping to open the dialog and pass the report name and criteria with a button, allowing for the selection of the printer or number of copies.<br><br>More background to this problem I'm having:<br><br>Developing away from the roll-out environment, and the reports showing up on the default printer settings (I don't know what printers will be used for the reports). <br><br>I've also been searching a few hours now for a good piece of code to instruct the printer on paper size and orientation, without success. I'm thinking common dialog control, but can't find any help files at all on them.<br><br>Florida, hmmm...Jersey here, pizza capital of the US. <br><br>Drew
Add the following code to the On Activate event of the report:<br><br>Private Sub Report_Activate()<br>On Error GoTo Err_Report_Activate<br><br>DoCmd.RunCommand acCmdPrint<br>DoCmd.Close acReport, Me.Name<br> <br>Err_Report_Activate:<br> Resume Next<br> DoCmd.Close acReport, Me.Name<br> <br>End Sub<br><br>Open the report with the acViewNormal argument. The above code code will cause the print dialog box to show. After the user enters the choices and clicks print, the report will then print according to the choices, but the report will remain hidden during the process.<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
I know this was posted a long time ago but I used your code and it worked great. I actually called it from a custom menu bar and it can be used for all my reports.
I am learning access and need some help. When i use the print report button it prints every record. I only want the report that is being displayed not the whole data base.
I tried your code DougP, but it doesn't work for me !!!
If I open the report with AcViewNormal argument, the Activate function isn't called (I looked with step by step execution), so the report is printed but the dialog isn't shown !!!
I tried with acViewPreview, but the function open_form is called and not Activate
What code do you use to open the report ???
I use :
DoCmd.OpenReport "Reunion_Commerciale", acViewNormal
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.