Dear MS Access Expert. Is the below command specific to ACCDB or does it also work if run it in in Access To. Microsoft Access allows us to export access object like table, query,etc to other formats like Excel, PDF, RTF, etc. Using “To” To. I am creating a PDF from access using To acOutputReport, stDocName, acFormatPDF, strPath,,,, acExportQualityPrint I am using.

Author: Bagar Vur
Country: French Guiana
Language: English (Spanish)
Genre: Finance
Published (Last): 17 June 2011
Pages: 252
PDF File Size: 5.37 Mb
ePub File Size: 17.14 Mb
ISBN: 685-3-71879-685-3
Downloads: 60533
Price: Free* [*Free Regsitration Required]
Uploader: Sakora

I hope this works once I create a runtime version of my the database although I am guessing that it won’t.

PDF output command has a problem, though; it can’t provide filtering by itself. There’s no filter clause, not a where statement you can play with.

Acoutpitreport browsing tons of webpages, my best VBA approach is as follows: Date, docmd.oitputto ‘State the filename. However, HelpFile for that function says you’ll need to state the object type and leave the ObjectName field blank if you want to print the active object that’s why I’ve got to open the form on preview mode and then close it. If you try acViewNormal it’ll throw an error. It might not be the sharpest encoding on Earth, but it works My issue seems somewhat different.


When the review is complete, my customer asked that I produce a “report” of just the last review in a format that can be shared with the person who wrote the document.

I programmed when the review is complete, the record is saved. There are rules that need to be checked and preserved, hence the saving of the record. I’ve created a duplicate of the review form with the criteria of accwss open to pull the last record.

My problem occurs when I print to the PDF.

Access – “Save as PDF” from VBA / automation

It prints ALL records in the acoutpputreport table, not just the “current” or last. How would you control the quality and size of the priint, do you acoutputrepirt to reset printer settings or change default print setting?

Since the report I am trying to create as a pdf requires it to be landscape and on legal paper. This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.

access 2010, DoCmd.OutputTo acOutputReport Problem

The content you requested has been removed. Remove From My Forums.

Sign in to vote. However, attempts to work out how to do this in code have so far drawn a blank.

To method (Access) | Microsoft Docs

RunCommand does not seem to be able to access this particular functionality. Could anybody point me in the direction of a solution? Thursday, March 22, Tuesday, March 27, Proposed as answer by Gio Grasshopper Sunday, December 27, Monday, February 23, Mariucci, That worked well for me.


Thanks for your post. Thursday, July 16, 5: Tuesday, August 11, This works great and handles the filtering! Sunday, December 27, The solution posted by Mariucci is key.

Export Access Object to Excel ,PDF, RTF , etc. using DoCmd.OutputTo

If you can master this stuff here, you have some true RAD development tools that give impressive results. Wednesday, January 27, 4: Tuesday, February 9, Works like a charm. Thursday, February 18, 8: I had the same problem as you. So i decided to do a little internet sniffing.

I use 1 form for reports combined with a table. The form has a listbox with names from reports list of telephones, list of members, Sunday, February 21, Hope my question is acoutputeport. Tuesday, September 18, 7: Thanks for the solution. Friday, September 21, 2: Proposed as answer by AccessGuru Wednesday, July 9, 9: Tuesday, July 8, 4: Help us improve MSDN.

Posted in <a href="" rel="category tag">Technology</a>