Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to generate pdf files in MS Access 2007 in "silent mode"

Posted on 2010-09-02
3
Medium Priority
?
575 Views
Last Modified: 2012-06-27
Hi,

I am using Access to generated reports in pdf files, but when it generates it keeps poping up the generation itself. Is there a possibility to hide this from the user experience?

Right now I have the following:
    DoCmd.OpenReport ReportName, acViewDesign
    Reports(ReportName).Filter = strFilter
    DoCmd.Close acReport, ReportName, acSaveYes
   
    DoCmd.OpenReport ReportName, acViewPreview, , strFilter
    DoCmd.OutputTo acOutputReport, "", acFormatPDF, Path & "\" & FileName, False
    DoCmd.Close acReport, ReportName

Thank you in advance.
0
Comment
Question by:DistillingExperts
3 Comments
 
LVL 14

Expert Comment

by:Bill Ross
ID: 33585286
Hi,

You might try turning off the screen during the procedure.

DoCmd.Echo False

   run your print process...

DoCmd.Echo True
  me.repaint  <-If you're calling from a form.

Regards,

Bill
0
 

Author Comment

by:DistillingExperts
ID: 33585441
Didn't work. Still showing while generating the pdfs.
0
 
LVL 10

Accepted Solution

by:
conagraman earned 2000 total points
ID: 33617629
DistillingExperts:

get rid of the ", False"

just use :
DoCmd.OutputTo acOutputReport, "", acFormatPDF, Path & "\" & FileName

hope this helps
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

916 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