Looping through Parameter Query

C

CCross

I currently have a parameter query that runs from an unbound form where I can
select from 95 different criteria and then run the query. This is great, but
I would really like to be able to loop through the 95 criteria without having
to select each one individually. Is this possible?
 
J

Jeff Boyce

If you are saying you want a query to run 95 times, each time with a
different criterion, consider doing this in a procedure, using the query's
SQL statement, and dynamically altering the SQL statement each time before
it executes.

Regards

Jeff Boyce
<Office/Access MVP>
 
C

CCross

Could you give me a sample sql statement?

Jeff Boyce said:
If you are saying you want a query to run 95 times, each time with a
different criterion, consider doing this in a procedure, using the query's
SQL statement, and dynamically altering the SQL statement each time before
it executes.

Regards

Jeff Boyce
<Office/Access MVP>
 
J

Jeff Boyce

Take one of your existing queries. Open it in design mode. Change the view
to the SQL view. That's the SQL statement that the query uses.

Regards

Jeff Boyce
<Office/Access MVP>
 
Top