We help IT Professionals succeed at work.
Troubleshooting Question

Access VBA export data using ExportAsFixedFormat

Murray Brown
Murray Brown asked
on
18 Views
Last Modified: 2020-07-21
Hi
In Access VBA does anyone have an example of using a SQL statement to export data as a pdf using  ExportAsFixedFormat ?
Thanks


Comment
Watch Question

NorieAnalyst Assistant
CERTIFIED EXPERT

Commented:
Murray

Do you mean export the query from Access and then save as a pdf?
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Hi. If that is the way to do it then yes. If there was a way to export data directly to pdf then that would have been good but if not then via word and save as pdf for example
John TsioumprisSoftware & Systems Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
You could always use a PDF printer and just print the report to it.
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks John. Is there no way to do this in Office? 
Software & Systems Engineer
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Maria BarnesPresident
CERTIFIED EXPERT

Commented:
You can export a REPORT to PDF.
DoCmd.OutputTo acOutputReport, "YourReportName", acFormatPDF, "PathAndNameOfFile.pdf"
So you could create a report to display your data, then call it using the above syntax.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.