?
Solved

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

Posted on 2014-04-11
3
Medium Priority
?
480 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 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

752 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