Programatically change Query criteria

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

I have an unbound form with some multi-select list boxes. I launch
several reports from this form, where the On Open event of the reports
builds a filter string based on what is selected from the form list
boxes. This all works very well.

PROBLEM: I have one situation where I needed to use 2 queries to
build my datasource. The reports record source is Query 2. However,
the criteria I want to filter on is in Query 1 and can not be part of
2, so my filter string isn't working because it doesn't see the field
I'm trying to filter on.

How can I programatically affect the criteria in Query 1 even when my
report is not using it as the record source? Or is there another way
fo filter?
 
Roger... oh my god thank you! :) This is exactly what I needed to
see. These helped me a lot. I didn't really realize I could do this.
It should go a long way to reducing my MDB file size and avoid ugly
queries within queries, etc.
 
Back
Top