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. Converting the macro to VBA reads as follows:
DoCmd.OpenReport "Receipt - full pay new", acViewNormal, "", "[ConsultID]=[Forms]![Payment Record Type]![ConsultID]"
However, if I do an output to PDF file as below, I can't insert a "where condition" to pick the specific file. Instead, it outputs the whole unfiltered report which is 12,000 pages and 29 MB!
DoCmd.OutputTo acOutputReport,"Receipt - full pay new",acFormatPDF,"C:\Access\ReceiptPDF.pdf"
Any suggestions on how to combine the 2, i.e. have the "where condition" to select the particular report page, but output to a PDF file in a selected directory.
Thanks for your help in advance.
Frank:banghead:
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. Converting the macro to VBA reads as follows:
DoCmd.OpenReport "Receipt - full pay new", acViewNormal, "", "[ConsultID]=[Forms]![Payment Record Type]![ConsultID]"
However, if I do an output to PDF file as below, I can't insert a "where condition" to pick the specific file. Instead, it outputs the whole unfiltered report which is 12,000 pages and 29 MB!
DoCmd.OutputTo acOutputReport,"Receipt - full pay new",acFormatPDF,"C:\Access\ReceiptPDF.pdf"
Any suggestions on how to combine the 2, i.e. have the "where condition" to select the particular report page, but output to a PDF file in a selected directory.
Thanks for your help in advance.
Frank:banghead: