Export multiple queries to a single Excel file

K

kidkosmo

I have multiple cross-tab queries that I'd like to output to a single
Excel file into separate tabs. Is this a possibility?
 
R

Roger Carlson

Absolutely. Just use the TransferText method to export your data. Specify
the same Excel file and each query will get exported to a separate tab.

You can do it in a macro or in VBA:
DoCmd.TransferSpreadsheet acExport, 8, "Query1", "C:\MySpreadsheet",
True, ""
DoCmd.TransferSpreadsheet acExport, 8, "Query2", "C:\MySpreadsheet",
True, ""
DoCmd.TransferSpreadsheet acExport, 8, "Query3", "C:\MySpreadsheet",
True, ""

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Z

zakrzewskiandrzejtkdami

Uzytkownik "kidkosmo said:
I have multiple cross-tab queries that I'd like to output to a single
Excel file into separate tabs. Is this a possibility?
 
S

Sara

I am trying to do the same thing, but when I have multiple rows, it'll only
do the first one.

I have 18 queries and I want them to dump their information into a single
spreadsheet. So far it will only do the first one and not the others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top