Solved

How print report to pdf and have it open right away on screen

Posted on 2014-04-11
3
439 Views
Last Modified: 2014-04-12
I'm having a problem with image resolutions (another topic) and want to try a work-around.

Is the a way via VBA to from a command button on a form, print a report to a pdf and then have that pdf report appear on the screen right away?

--Steve
0
Comment
Question by:SteveL13
3 Comments
 
LVL 13

Expert Comment

by:akb
ID: 39995272
I'm not sure about using VBA however there is another way to do it. Install PDFCreator from SourceForge. It is open source and free. Set PDFCreator as default printer. Print a document and select Options. Go to Auto-save and tick Auto-save and "After auto-saving open the document...".
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39995305
place this codes in the click event of a button

private sub button_click()

DoCmd.OutputTo acOutputReport, "rptTable2", acFormatPDF, CurrentProject.Path & "\myReport.pdf"

FollowHyperlink CurrentProject.Path & "\myReport.pdf"


end sub
0
 

Author Closing Comment

by:SteveL13
ID: 39996094
This worked perfectly.  The only thing is it seems to open the pdf at 105%.  I wish it was about 75%.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
view mode vs edit mode 17 47
ms access 2013, running .mdb 2 30
How to make query not show results in table form go straight to report 4 21
access 7 21
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now