Seph
Member
- Local time
- Today, 18:22
- Joined
- Jul 12, 2022
- Messages
- 72
Good day everyone,
Please can you assist me.
I have the following code which opens my reports InvoiceJobR/InvoiceSalesR in Print Preview, depending on the IIF criteria.
The code however, opens the report with the name of the report.
I'd like for it to open with the name of the InvoiceNumber field on the report so that when I print the report to PDF it reflects the invoice number.
Thank you in advance!
Please can you assist me.
I have the following code which opens my reports InvoiceJobR/InvoiceSalesR in Print Preview, depending on the IIF criteria.
Code:
Private Sub InvoiceNumber_Click()
DoCmd.OpenReport IIf(SalesInvoice, "InvoiceSalesR", "InvoiceJobR"), acViewPreview, , "InvoiceID=" & InvoiceID
End Sub
The code however, opens the report with the name of the report.
I'd like for it to open with the name of the InvoiceNumber field on the report so that when I print the report to PDF it reflects the invoice number.
Thank you in advance!