pcdaveh,
The bimmer solution works well, but if you don't want to use globals, which can be dangerous, you'll have to just dynamically alter the sql of the query. Ie, if you had a static query, meaning all the same select fields and joins were not going to change, you could just get the sql from the querydef in code, use Instr() to find the Where clause, trunc the sql at that spot, then add your where clause using the variable local to the procedure you're in, and reset the querydefs.sql to the new sql
--Jim