Hello,
I need help with the below code. I am trying to name and save to PDF my Invoices without having to manually name them. The problem with the code is that it is saving ALL the invoices as one document when only need the current record/invoice saved. Here is the code:
Thanking you in advance for your help
I need help with the below code. I am trying to name and save to PDF my Invoices without having to manually name them. The problem with the code is that it is saving ALL the invoices as one document when only need the current record/invoice saved. Here is the code:
Code:
Dim FileName As String
Dim FilePath As String
FileName = Me.InvID & " - " & Me.ClientID
FilePath = "C:\Users\reva_\OneDrive\My Documents\Training\" & FileName & ".pdf"
DoCmd.OutputTo acOutputReport, "rptInvoices", acFormatPDF, FilePath
MsgBox "Invoice has been saved successfully", vbInformation, "Save confirmed"
Thanking you in advance for your help