View Single Post
  #2 (permalink)  
Old June 9th, 2009, 02:41 PM
mmcdonal mmcdonal is offline
Friend of Wrox
Points: 9,516, Level: 42
Points: 9,516, Level: 42 Points: 9,516, Level: 42 Points: 9,516, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,060
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It seems to me that you are going the long way around just to dump data in a spreadsheet. Why not try this:

Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "TableOrQueryName", "C:\Documents and Settings\All Users\Desktop\SpreadsheetName.xls", True
Just replace the TableOrQueryName with the name of a table or query in your database, and replace the SpreadsheetName.xls with whatever name you want.

This will dump a copy of the table or query on your desktop in a spreadsheet with the name you designate, with a worksheet that has the same name as your table or query.

Did that help?
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote