Solved

MS Access 2010 - Print report without print preview and show printer dialog

Posted on 2013-01-15
3
4,054 Views
Last Modified: 2013-12-17
I want a button in a form to print a report without showing the print preview of the report, but with showing the printer dialog so the user can select a printer or cancel the print job if he changes his mind. How might I do this?

Thanks
0
Comment
Question by:Jolio81
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 400 total points
ID: 38781137
As far as I know that is not possible in Access.

However, a work-around that gets you halfway there is to immediately open the print dialog upon opening your report in preview mode:

DoCmd.OpenReport "rptYourReportName", acViewPreview
DoCmd.RunCommand acCmdPrint

Open in new window

0
 
LVL 61

Expert Comment

by:mbizup
ID: 38781168
Another option that might work better for you would be to create a custom print dialog form with a combo box to select your report, and textboxes for page ranges number of copies, etc.

You would still have to open your report in print preview to make it the active object for printing, but then you could use code to automatically close it immediately after printing.

The actual printing could be done with the PrintOut command, which gives you a lot of flexibility for copies, ranges, collation, etc.  See this article for details:

http://msdn.microsoft.com/en-us/library/office/ff192667.aspx
0
 
LVL 57
ID: 38782594
<<Another option that might work better for you would be to create a custom print dialog form with a combo box to select your report, and textboxes for page ranges number of copies, etc.>>

That's what On The Fly printing did.  Works well, but is no longer available:

http://www.groupacg.com/acgOTF.htm

 and not for Access 2010.

 Not sure  why they decided not to go with 2010, but I can tell you the code to support what your trying to do is extensive in OTF.  Took them years to develop it.

 That was before there was a printer object though, which is what most of their code deals with.

Jim.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question