Hi Guy's i can't find this issue, i am getting a run time error on output report ?
The files are in the path
I have a criteria on the paths as there is a different report to outpout depending on name so:
The Output to was cancelled run time error 2051
Code:
If Right(Me.txtInvoiceTo,2) = "BV" Then
InvPath = "T:\Customer BV\Invoices\"
DoCmd.OutputTo acOutputReport, "rptInvoiceBV", acFormatPDF, InvPath & "Invoice" & " " & Me.txtInvoiceNumber & ".pdf", True
End IF
If Right(Me.txtInvoiceTo,2) <> "BV" Then
InvPath = "T:\Customer\Invoices\"
DoCmd.OutputTo acOutputReport, "rptInvoice7", acFormatPDF, InvPath & "Invoice" & " " & Me.txtInvoiceNumber & ".pdf", True
End IF