Remember Me? Outputto PDF crashes Access. Results 1 to 7 of 7. Multiple DoCmd. Thread Tools Show Printable Version.
|Published (Last):||1 January 2012|
|PDF File Size:||5.51 Mb|
|ePub File Size:||18.42 Mb|
|Price:||Free* [*Free Regsitration Required]|
Thread starter FrankT Start date Nov 30, FrankT New member. Local time Tomorrow, Joined Nov 30, Messages 2. Hi there! My first post! I would like to print a report file from a database into PDF format.
Currently I am using a macro with a "where condition" to select the particular file which currently outputs to the default printer. Instead, it outputs the whole unfiltered report which is 12, pages and 29 MB! Thanks for your help in advance. Local time Today, Joined Aug 30, Messages 34, One way is to use both lines, but change the first to open in Preview mode. After the OutputTo line, close the report. Thank you, Paul. That works brilliantly! Thanks again. Happy to help Frank!
Local time Today, Joined Apr 19, Messages 4. If the report has no results, I am getting a hundred page report. Openreport sees no records and throws an error which I catch and print a message box asking the user to make sure the month and year are correct. OutputTo on the other hand ignores the where conditions that openreport used and makes a hundred page report of my whole database.
This works perfectly if Openreport finds records. Gasman Enthusiastic Amateur. Local time Today, Joined Sep 21, Messages 5, So do not OuputTo if you get that error? Local time Today, Joined Jan 30, Messages Gasman said:.
Is that going to work, as that is what happening now? The report is not open, so it is opened by the DoCmd. Local time Today, Joined Apr 3, Messages OpenReport … 'therefore code will exit and this won't run DoCmd. We are not getting the full story here.? I just tried with criteria that would produce an empty report and that is exactly what I got, an empty report.? Report View doesn't run all VBA.
Needs to open in Print Preview. Or code isn't compiled and saved? You must log in or register to reply here. Top Bottom.
Export Access Object to Excel ,PDF, RTF , etc. using DoCmd.OutputTo
This Access tutorial explains how to use DoCmd. OutputTo Method and DoCmd. TransferSpreadSheet Method to export different objects to specific file types, for example, export Query to xlsx. Access VBA auto generate mass report by group to Excel.
Where Condition and Output to PDF file
Forums New posts Search forums. What's new New posts New profile posts Latest activity. Members Current visitors New profile posts Search profile posts. Log in Register. Search titles only. Search Advanced search….
Subscribe to RSS
How to Output a dynamically filtered Access report to PDF
Forums New posts Search forums. What's new New posts New profile posts Latest activity. Members Current visitors New profile posts Search profile posts. Log in Register. Search titles only.