I have a form used to run a report.
I have managed to output the report in pdf form by using the following VBA:
DoCmd.OutputTo acOutputReport, "rptPrnAuto", acFormatPDF, "C:\Users\Shree\Desktop\NKToEmail\AutoAb.PDF"
But I want to replace the generic AutoAb.pdf with the Firstname and surname given in the form. So the given report pdf will be generated with the name eg: AlanSmith.pdf
That is, I want to insert the Firstname & Surname fields from the form to the name of the .pdf output.
Can anyone help me with this please?
I have managed to output the report in pdf form by using the following VBA:
DoCmd.OutputTo acOutputReport, "rptPrnAuto", acFormatPDF, "C:\Users\Shree\Desktop\NKToEmail\AutoAb.PDF"
But I want to replace the generic AutoAb.pdf with the Firstname and surname given in the form. So the given report pdf will be generated with the name eg: AlanSmith.pdf
That is, I want to insert the Firstname & Surname fields from the form to the name of the .pdf output.
Can anyone help me with this please?