Need help in exportwithformatting (1 Viewer)

amjedakrem

New member
Local time
Today, 11:22
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:22
Joined
May 7, 2009
Messages
19,169
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

Top Bottom