Never sure if this kind of query should be in Reports or Inport/Export. Mods, feel free to move this thread if neccessary.
I have a situation where I would like a formatted report that I have created, called "Payment Letter PDF" to both save to a defined path AND open up in Acrobat Reader, so that I can have the opportunity to print it as saved.
I have a button (called "cmdCreatePDF") in a toolbar on my main form. Currently it is coded with the following Event Procedure, which hopefully produces a report of a single record only...
(I hope that it's correct)Private Sub cmdCreatePDF_Click()
Dim strReportName As String
Dim strcriteria As String
strReportName = "Payment Letter PDF"
strcriteria = "[SUBJECT (ROAD)]='" & Me![SUBJECT (ROAD)] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strcriteria
End Sub
Put into action, the button does indeed create a single report page, although clicking on the "forward" button seems to replicate it. Anyway, what I would really like, is for this report to be produced, not in Access as such, but in PDF format BOTH as a saved document written to a defined path, and with the file name along the lines of "FROM - Todays date.pdf" and also to open up in Adobe Reader so that I can print it if needed.
I use Access 2000, and Acrobat 9, but as it's a company computer, I cannot install any other third party system files or software.
Is there a simple copy & paste (or replace) addition to the above code that I can use to enable the PDF creation, saving and displaying? I've seen some "solutions" on line, but for one reason or another, they all seem project specific with references to form fields and other terminology that may mean things to others, but not to me. Something a little more idiot-proof may be needed in my case, with simple instructions of what to insert where as and where neccessary if possible.
Thanks in advance.
Martin