Macro Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to pass a value to a query which is then used to run a crosstab query.
I need to run these two queries 23 times passing a different value to it
every time. Can I write a "simple" macro to pass the value and run my queries
without having to write 23 pairs of regular quries to do the same work? If
so, how would I code this?
 
Bqbowden,

Where do these 23 criteria values come from?

In any case, there is something that doesn't quite make sense to me
here. What does "run my queries" mean in this context? If you have a
query, and then another query is based on that first query, then you
don't need to "run" the first query - the second query accesses it when
it is run. But then, the second query (in your case a crosstab) would
not normally be "run" in a macro either. Normally, it would be the
basis for a form or report, and the form or report is opened, in so
doing the second query is accesses without being explicitly "run". So
you might need to give a bit more detail or example of what you are
trying to achieve. Thanks.
 
I have a select query sorting data by "district" number. Then I run a
crosstab against that query to get data by store and date. I then export the
crosstab to an excel spreadsheet. I have 23 districts I need to do this for.
 
Back
Top