Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute Access 2007 Report and Export that Report to PDF Programmatically?

I have a great report in an Access 2007 Database and would like to automate the execution and exportation of that report. Is this possible and what would be your first guess at the method needed to pull it off?

like image 750
MattUebel Avatar asked Dec 20 '25 14:12

MattUebel


1 Answers

You should be able to automate using the DoCmd.OutputTo method. I think the PDF feature requires SP1 for A2007. Here's a simple example:

DoCmd.OutputTo acOutputReport,"rptFoo",acFormatPDF,"D:\Access\rptFoo.pdf"

Look at the MSDN page for more details: DoCmd.OutputTo Method

like image 175
HansUp Avatar answered Dec 23 '25 14:12

HansUp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!