I am creating a report based on a dynamic query. I get a recordset of all records on my main table and loop through it to create 1 report.rtf file for each record. With each iteration I set the qryDef.Sql. This works, but I think it is cumbersome to have this large sql string. It would be easier if I could just update the criteria or the where clause, but I can't see that property in the query definition when I am in the VBA.
In Access' qry design mode , you can see this is a propert and Access allows you to define filters all over the place (reports, forms). If I wanted to just create the report to view I could pass the filter, but I am using DoCmd.OutputTo to output a file ... and it does not accept a filter arg, so I am looking for a better way to update the sql the form refers to.
Let me know if you have any thoughts.
Thanks in advance.
Blair
In Access' qry design mode , you can see this is a propert and Access allows you to define filters all over the place (reports, forms). If I wanted to just create the report to view I could pass the filter, but I am using DoCmd.OutputTo to output a file ... and it does not accept a filter arg, so I am looking for a better way to update the sql the form refers to.
Let me know if you have any thoughts.
Thanks in advance.
Blair