Creating Multiple Tab Excel Output File

S

Sue

Hi
Trying to output 3 queries and create just 1 excel .xls or .csv file with 3
tabs. Is this possible please? If so how do I do it?

Cheers
Sue
 
J

Jeanette Cunningham

Sue,
you can export the 3 queries, one after the other using Transfer Spredsheet.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryOne", _
"C:\Documents and Settings\Jeanette\Desktop\MyFile.xls"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryTwo", _
"C:\Documents and Settings\Jeanette\Desktop\MyFile.xls"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryThree", _
"C:\Documents and Settings\Jeanette\Desktop\MyFile.xls"

The above will give you 3 tabs in the same workbook.


Jeanette Cunningham -- Melbourne Victoria Australia
 

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