TransferSpreadsheet method: code check!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use this method to export info to Excel and I would like it so
another person can specify the file name before it gets exported.

I have a '438' run-time error: Object doesn't support this property or method.

Can someone check this

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Errors", _
"S:\ASSET DATA SERVICES\CUSTOMER SATISFACTION TEAM\Queries Database 2007\New
Database\" & [Forms]![menu]![Reports menu].Forms![SavePath] & ".xls", ,
"Errors"

thanks
 
Because of the spaces in your path, try putting double quotes:

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Errors", _
"""S:\ASSET DATA SERVICES\CUSTOMER SATISFACTION TEAM\Queries Database
2007\New
Database\" & [Forms]![menu]![Reports menu].Forms![SavePath] & ".xls""", ,
"Errors"
 
thanks for the reply but I am still getting the same error.




Douglas J. Steele said:
Because of the spaces in your path, try putting double quotes:

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Errors", _
"""S:\ASSET DATA SERVICES\CUSTOMER SATISFACTION TEAM\Queries Database
2007\New
Database\" & [Forms]![menu]![Reports menu].Forms![SavePath] & ".xls""", ,
"Errors"


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


scubadiver said:
I want to use this method to export info to Excel and I would like it so
another person can specify the file name before it gets exported.

I have a '438' run-time error: Object doesn't support this property or
method.

Can someone check this

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Errors", _
"S:\ASSET DATA SERVICES\CUSTOMER SATISFACTION TEAM\Queries Database
2007\New
Database\" & [Forms]![menu]![Reports menu].Forms![SavePath] & ".xls", ,
"Errors"

thanks
 
Back
Top