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

exporting into excel file

Status
Not open for further replies.

esengul

Instructor
Dec 9, 2004
59
US
i have more than one queries that need to export into excel file
my problem is, when i export 3rd queries results, i want to insert them in query23 (which is already exists) and start from A34 cell.
here is my code
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Chart", filename, , "query23!A34:B36"
when i try this, i get an error saying it already exits...
i dont know what i am doing wrong
thanks
 
stright out of access help

If you select Import in the Transfer Type argument, Microsoft Access appends the spreadsheet data to this table if the table already exists. Otherwise, Microsoft Access creates a new table containing the spreadsheet data.

use acImport or just leave the first argument blank

DoCmd.TransferSpreadsheet ,acSpreadsheetTypeExcel9, "Chart", filename, , "query23!A34:B36"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top