Need help in exportwithformatting

amjedakrem

New member
Local time
Today, 17:55
Joined
May 19, 2020
Messages
4
Hi access experts,
I need a help in writing the format of the name of pdf file I would save after I press "save" button in Report through Macro. I want it to be like it (invoiceId) in the format of "000000" then (customer name) then ".pdf"
Thank you in advance
 
instead of using Macro, use [Event Procedure]:
Code:
private sub button_click()
DoCmd.OutputTo objecttype:=acOutputReport, _
        objectname:="report_name_here", _
        outputformat:=acFormatPDF, _
        outputquality:=acExportQualityPrint, outputfile:=Format([InvoiceID], "000000") & [customer name] & ".pdf"
end sub
 

Users who are viewing this thread

Back
Top Bottom