Solved

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

Posted on 2014-04-11
3
455 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
[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
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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

730 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