2003/2007 Access Conversion

D

Darryl

In doing some testing of a database conversion (2003 to 2007), one of my VB
codes exports a query to spreadsheet (docmd.transferspreadsheet acExport,
acSpreadsheetTypeExcel9, c:\filename.txt). When I run the code, the export
is not taking place. My suspicion is that since the code is trying to export
in 2000, but I'm running 2007, it's causing a conflict. Can anyone help me
resolve this?
 
T

Tom van Stiphout

On Tue, 14 Oct 2008 11:21:02 -0700, Darryl

My suspicion is you got the arguments wrong, AND you got the file
extension wrong. This worked for me in A2007:
docmd.transferspreadsheet acExport, acSpreadsheetTypeExcel9,
"Customers", "c:\filename.xls"

-Tom.
Microsoft Access MVP
 
D

Darryl

Sorry - that code line was from memory. the actual line is:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query",
"C:\Query Export.xls", True

Darryl
 

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