H
homer
Hi,
I want to find a way to pass a Where clause to an pre-built query either
from form or from code module in Access 97.
Because the select statement is pretty lengthy and involves many joins, I
want to stay away from pasting the whole statement. Instead, I saved it in a
query.
I looked under OpenQuery, QueryDef, and RunSQL, but none of them meets my
need.
OpenQuery: I did not find a way to pass the where clause to the method.
RunSQL: I did not find a way to bring in existing query sql.
QueryDef seems come most close to what I need. The Parameter will take my
where clause, and the name property will bring in the pre-built query.
Am I on the right track? Can somebody show me an example of querydef, name,
parameter work together?
Thanks!
I want to find a way to pass a Where clause to an pre-built query either
from form or from code module in Access 97.
Because the select statement is pretty lengthy and involves many joins, I
want to stay away from pasting the whole statement. Instead, I saved it in a
query.
I looked under OpenQuery, QueryDef, and RunSQL, but none of them meets my
need.
OpenQuery: I did not find a way to pass the where clause to the method.
RunSQL: I did not find a way to bring in existing query sql.
QueryDef seems come most close to what I need. The Parameter will take my
where clause, and the name property will bring in the pre-built query.
Am I on the right track? Can somebody show me an example of querydef, name,
parameter work together?
Thanks!