I've tried filtering the report with from a separate query "zzqryTrialInvoiceBATCHTESTCOPY"
With MyRS
Do While Not MyRS.EOF
DoCmd.OpenReport strRptName, , , "[zzqryTrialInvoiceBATCHTESTCOPY].[OrderID]='" & ![OrderID] & "'"
'Debug.Print ("OrderID: " & MyRS!OrderID & " Qty " & MyRS!Qty)
DoCmd.OutputTo acOutputReport, strRptName, acFormatPDF, "C:\TempInvoicePDF\" & ![OrderID] & ".pdf"
DoCmd.Close acReport, strRptName, acSaveNo
However, when it runs it keeps asking for the [zzqryTrialInvoiceBATCHTESTCOPY].[OrderID] value. I would have thought that as each OrderID is looped that the OrderID would automatically filter the opening of the report....it doesn't seem to be the case. I must be doing something wrong here.