Save Access Form based on order number & Client Name using VBA

kevinv

Registered User.
Local time
Today, 11:45
Joined
Mar 31, 2009
Messages
11
I have an acces form to input client orders. Each order has its own order number a different client. On the same form I have a button to generate a report based on the inpuuted data on the
same form which works perfectly fine.

Now I need to use same report to save each order in a specific folder on my computer in pdf format. However I would like to have the file generated as follows
ordernumber "-" clientname.pdf.

This way each order is saved in the same folder without overwriting the previous one.
Can you please provide the VBA code to do this?

Thanks for your help.
 
Try using OutputTo and in the file name argument concatenate:

Me.OrderNumber & "-" & Me.ClientName & ".pdf"

Using your names of course.
 

Users who are viewing this thread

Back
Top Bottom