Patrick O'Dea
asked on
Saving a PDF file
I have 2 bits of code whose logic I wish to combine;
The bottom line is that I want to write a PDF to my C: Drive.
Code A below generates a report correctly. Note the sWhere filter.
Code B writes to disk but DOES not have a filter.
I guess I want to know - How do I write code B with the filter.
(Hopefully this is clear, it is late here and time for bed!)
The bottom line is that I want to write a PDF to my C: Drive.
Code A below generates a report correctly. Note the sWhere filter.
Code B writes to disk but DOES not have a filter.
I guess I want to know - How do I write code B with the filter.
(Hopefully this is clear, it is late here and time for bed!)
CODE A
=======
sWhere = "[CustomerID] = " & Me.CustomerID
DoCmd.OpenReport "rptOrderDetails", acViewPreview, , sWhere
Code B
=======
DoCmd.OutputTo acReport, "rptorderdetails", acFormatPDF, "myreport" & ".pdf", False, ""
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I have nearly got it...
ASKER
I should have clarified in the first instance.
It is not really a report at at (!) It is a single page output of ONE record.
Hence the output is more like a screen dump of customer data.
I do not need a recordset.
I just want the single record output where the customerID joins the report and the form.