how to automatically output the same query multiple times to excel

how to automatically output the same query multiple times to excel

am 04.01.2008 13:45:10 von mike_boghossian

Good morning,

I am a relatively novice access user. I was given the grand
assignement yesterday of outputting queries for a sales organization
to excel and repeating this once a week. The queries are simple, but
I need to have a separate query for each salesperson (approx 300).
Plus, I then need to arrange each-salesperson's queries into a single
excel workbook (one query per worksheet).

The data is too large to do it completely in excel. I have used
access quite a bit but I have never had to do something like this.
Any ideas?

Cheers!

Re: how to automatically output the same query multiple times to

am 04.01.2008 17:02:45 von ClevelandSteve

I've done something like this long ago. How much VBA do you know?
Save all of your sales people in a table. Then in VBA open the sales
people table as a record set, move to the first record and pass the
name as a parameter to the query. Once the query executes, VBA can
open an instance of Excel, dump the query results into the workbook,
then save the workbook to a directory on your pc. Then move to the
next sales person in the record set and repeat the process. If you
wanted to take it a step further you could even have VBA email the
Excel workbook to each person.