G
Guest
Greetings,
I have several reports that are based upon a couple of large tables. I have
it set up to where the DB user has lots of filtering options and I build SQL
WHERE clauses to filer the reports… and this works fine. I also have it so
that the user can export the reports to a file as various formats. Here
though, I use the “DoCmd.OutputTo†method and there is not place for a WHERE
clause. I have gotten around this by using the
CurrentDb.QueryDefs("qrySharedMemberData02").SQL = strSQL1
for the report query. Now that works… but strSQL is massive because it
contains all the query defs and this is a big query. My question: Is there
a simple way to filter an existing query by applying the WHERE statement
without having to define all the query fields every time? Bruit force works,
but I would like to find a simpler way.
Thanks for your help.
I have several reports that are based upon a couple of large tables. I have
it set up to where the DB user has lots of filtering options and I build SQL
WHERE clauses to filer the reports… and this works fine. I also have it so
that the user can export the reports to a file as various formats. Here
though, I use the “DoCmd.OutputTo†method and there is not place for a WHERE
clause. I have gotten around this by using the
CurrentDb.QueryDefs("qrySharedMemberData02").SQL = strSQL1
for the report query. Now that works… but strSQL is massive because it
contains all the query defs and this is a big query. My question: Is there
a simple way to filter an existing query by applying the WHERE statement
without having to define all the query fields every time? Bruit force works,
but I would like to find a simpler way.
Thanks for your help.