Les Isaacs
Registered User.
- Local time
- Today, 00:10
- Joined
- May 6, 2008
- Messages
- 184
Hi All
In code I have a recordset rsOrders which includes the field rsOrders!orderID. I need to generate a report for each value of rsOrders!orderID, and then save that report as a PDF with date and the rsOrders!orderID value appended to the filename. So if rsOrders has 15 records I end up with 15 PDFs - e.g. order72345, order15346, etc.
So I want loop through the recordset, then generate the PDF with a DoCmd.OutputTo acOutputReport, "rptOrder", acFormatPDF, ("Order" & Format(Now(), "mmmyyyy") & "-"& rsOrders!orderID & ".pdf"), True
But this obviously does not filter the report for the selected rsOrders!orderID value, and I can't work out how to do that!
Hope someone can help.
Thanks i advance.
Les
In code I have a recordset rsOrders which includes the field rsOrders!orderID. I need to generate a report for each value of rsOrders!orderID, and then save that report as a PDF with date and the rsOrders!orderID value appended to the filename. So if rsOrders has 15 records I end up with 15 PDFs - e.g. order72345, order15346, etc.
So I want loop through the recordset, then generate the PDF with a DoCmd.OutputTo acOutputReport, "rptOrder", acFormatPDF, ("Order" & Format(Now(), "mmmyyyy") & "-"& rsOrders!orderID & ".pdf"), True
But this obviously does not filter the report for the selected rsOrders!orderID value, and I can't work out how to do that!
Hope someone can help.
Thanks i advance.
Les