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!)
sWhere = "[CustomerID] = " & Me.CustomerID
DoCmd.OpenReport "rptOrderDetails", acViewPreview, , sWhere
DoCmd.OutputTo acReport, "rptorderdetails", acFormatPDF, "myreport" & ".pdf", False, ""