troubleshooting Question

Need To Add A Parameter to A Report Using acOutputReport

Avatar of ajd3rd
ajd3rd asked on
Microsoft Access
6 Comments1 Solution960 ViewsLast Modified:
I am trying to create reports in Access 2007 and output them to a pdf documents.  I have a report that I want to run and pass a fund number as a parameter and then output it to a pdf doc.  I've attached the code that I'm using to run the report and create the pdf.

I've been unable to pass in the fund number so the report uses it as a filter.


Function PrintToPDF(SrcFile, DestFileName As String)
On Error GoTo PrintToPDF_Err

ShowPdf = False
DoCmd.OutputTo acOutputReport, SrcFile, "PDFFormat(*.pdf)", DestFileName, ShowPdf, "", 0, acExportQualityPrint

    Exit Function

    MsgBox Error$
    Resume PrintToPDF_Exit

End Function

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros