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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Access Queries To Excel 1

Status
Not open for further replies.

debzz

Programmer
May 3, 2005
4
US
Hello,

I currently have a Query that I'm exporting to excel programaticaly (sp?) via the OutPutTo command. It works fine.

I want to add two other queries to the same Excel file, but as separate worksheets (tabs) in the excel file. Currently when I attempt this, it overwrites the existing file.

So, I basicly have 3 Queries I'd like exported into one excel file, but with separate worksheets. I have a feeling OutPutTo is not going to work for me.

Access Version is 97 Currently. But that can be changed to Access 2000 if needed.

Thanks,

Deb
 
Hi Deb!

Use the DoCmd.TransferSpreadsheet instead. This will add sheets to an existing workbook or create the workbook depending on whether or not the workbook exists. You may need to put a message box between each export just to give the query time to run before starting the next.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thank You!!! That worked like a charm :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top