Running a query a set number of times

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

Hi, i need to run a query a set number of times to produce
a set of records with incremental number values, anyone
know how this can be done?, thanks.
 
Click Macro > New. When the dialog opens click the first
cell under Command. Select OpenQuery. Repete this for
this process for the "set number" of times you want the
query to run. If it were me however, I would create a
seperate query for each iteration then create a macro to
run the seperate queries. To do this right click on your
saved query, click copy, then paste and name your new
queries something like qryQueryIter1, qryQueryIter2,
qryQueryIter3... qryQueryIter100. Don't under estimate
the power of database administration. By-the-way, you
may need to close the query in the macro before running
the next iteration.

Marty
 
Back
Top