Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting multiple quey's to multiple excel 2003 files

Status
Not open for further replies.

gopie

MIS
Jun 6, 2007
1
BE
Hello,

I hope someone can help me with the following question:
I want to have a button in access that when i click it, it will export most of the query's to excel 2003 files. The new excel files must have the same name as the exported query.
All the new excel files will be stored in one directory, for example: "C:\Test\Production"

Thanks for your help

Gopie
 
use the query defs collection to loop through all the queries on the database and in each loop, use transferspreadsheet to export the query...

something like:

for each qry in currentproject.querydefs
docmd.transferspreadsheet qry.name, "C:\folderName\" & qry.name
next qry

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top