TransferSpreadsheet method: code check!

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
 
D

Douglas J. Steele

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"
 
G

Guest

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
 

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