Save report as PDF & Auto populate file name

bulldogs

New member
Local time
Tomorrow, 07:10
Joined
May 9, 2013
Messages
5
My reports are saved as a PDF at the moment I click the print report button, select cutePDF Writer then manually add the Quote number stored in Field from the Table or form into the file name, then select the location to store the PDF file

Can I make this process automated when I click the print report button to auto select PDF Print, then auto populate the file name with the quote/Inv Number and then save to nominated directory.
 
Thanks sxschech
Tried everything with this was unable to make it work
 
Have your tried the Docmd.OutputTo method?

DoCmd.OutputTo acOutputReport, "rptName", "PDF Format (*.pdf)", Me!QuoteInvNumb

as a button on the form you use to select which Quote to print.
 
The Debug report keeps advising the NumQuote field cannot be found in the expression,
this seems like a, in the to hard basket and its possible the fault of my fundamental design on the data base itself, Ive found that when I tried to perform other task like create a query on a field that is look up field it will not work so I have learnt some things the hard way.
:banghead:
Any way you live and learn, Still open to suggestions and I will plug away myself
Thanks billmeye
 
- Make a regular button and create an "On Click" event procedure and copy this code for it.

Private Sub btn_PDFExport_Click()
On Error GoTo EndEarly

DoCmd.OutputTo acOutputReport, Me.Name, "*.pdf", "Order Status Report.pdf", True, , , acExportQualityPrint

EndEarly:
Resume Next

End Sub

- The "Order Status Report.pdf" will be the name of the exported file.
 

Users who are viewing this thread

Back
Top Bottom