-
Ive got it!
What I found was that using a free PDF converter like PDF995 you can get PDF995 to automatically name the PDF based on what is printing it. I noticed that PDF995 was using the caption on the form to name the PDF file so all I do is take the invoice number and set it as the caption for the report and print it out, whala!
Code below;
[VBA] Private Sub cmdPrintInv_Click()
Dim invnum As Integer
invnum = InvoiceNumber
DoCmd.OpenReport "rptinvoice", acViewPreview
Reports("rptinvoice").Caption = "Invoice" & InvoiceNumber
Set Application.Printer = Application.Printers(0)
DoCmd.PrintOut
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules