2003/2007 Access Conversion

  • Thread starter Thread starter Darryl
  • Start date Start date
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?
 
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
 
Sorry - that code line was from memory. the actual line is:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query",
"C:\Query Export.xls", True

Darryl
 
Back
Top