Hi Guys,
I'm after some guidance please as I’m sure I’m going a long and complicated way about things here.
Basically I have a report that’s generated from a query to select the current viewed record in a form.
What I want to do is click a button on the form and have the report print 3 times and save as a pdf in a specific folder with the name taken from the report.
I can get it print 3 times and export to a pdf with the name taken from the report I just can’t get it so save in a folder of my choosing (C:\exports).
The code I have so far is:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "Bedfords", acViewPreview
DoCmd.PrintOut , , , , 3
DoCmd.OutputTo acOutputReport, Bedfords, acFormatPDF, Me.Customer_Order_Number & ".pdf", True, "", 0
Could someone please point me in the right direction to add in the folder I want to export it to?
Thanks in Advance
I'm after some guidance please as I’m sure I’m going a long and complicated way about things here.
Basically I have a report that’s generated from a query to select the current viewed record in a form.
What I want to do is click a button on the form and have the report print 3 times and save as a pdf in a specific folder with the name taken from the report.
I can get it print 3 times and export to a pdf with the name taken from the report I just can’t get it so save in a folder of my choosing (C:\exports).
The code I have so far is:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "Bedfords", acViewPreview
DoCmd.PrintOut , , , , 3
DoCmd.OutputTo acOutputReport, Bedfords, acFormatPDF, Me.Customer_Order_Number & ".pdf", True, "", 0
Could someone please point me in the right direction to add in the folder I want to export it to?
Thanks in Advance