Export to PDF

2wistd

Registered User.
Local time
Yesterday, 16:44
Joined
Jan 17, 2013
Messages
66
Code:
DoCmd.OutputTo acOutputReport, "Breakdown Hourly", acFormatPDF, "Hourly Breakdown - " & Format(Now, "hh:mm") & ".pdf", True, "", acExportQualityPrint

What is wrong with this code? Each time I push the button it shows the popup for microseconds, then does nothing. If I reduce it to:

Code:
DoCmd.OutputTo acOutputReport, "Breakdown Hourly", acFormatPDF, "Hourly Breakdown.pdf", True, "", acExportQualityPrint

I have no problem at all. I've also used "Time", and "Date", with no luck.
 
You can't use colons in file names.


Use this:

DoCmd.OutputTo acOutputReport, "Breakdown Hourly", acFormatPDF, "Hourly Breakdown - " & Format(Now, "hh_mm") & ".pdf", True, , acExportQualityPrint

And don't put "" in parameters that aren't passing any values. Just leave it blank between the commas.
 
Awesome, works like a charm.
 

Users who are viewing this thread

Back
Top Bottom