438 Error: Code check

G

Guest

Apologies for double posting but I need a response to this.

Can anyone tell me what is wrong with this code? I am getting a "438" error.
I was told to put double quotes in the last row but I am still getting the
same error.

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

Thanks
 
D

Douglas J. Steele

You haven't closed the double quotes. See whether that makes a difference:

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

Guest

The last line was wrong. At the moment it is:

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

and I still get the error.



Douglas J. Steele said:
You haven't closed the double quotes. See whether that makes a difference:

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


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


scubadiver said:
Apologies for double posting but I need a response to this.

Can anyone tell me what is wrong with this code? I am getting a "438"
error.
I was told to put double quotes in the last row but I am still getting the
same error.

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

Thanks
 
D

Douglas J. Steele

That should be

[Forms]![menu]![Reports menu].Form![SavePath]

(You have Forms in both places)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


scubadiver said:
The last line was wrong. At the moment it is:

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

and I still get the error.



Douglas J. Steele said:
You haven't closed the double quotes. See whether that makes a
difference:

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


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


scubadiver said:
Apologies for double posting but I need a response to this.

Can anyone tell me what is wrong with this code? I am getting a "438"
error.
I was told to put double quotes in the last row but I am still getting
the
same error.

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Errors", _
"""S:\ASSET DATA SERVICES\CUSTOMER SATISFACTION TEAM\Queries Database
2007\New Database\" & [Forms]![menu]![Reports menu].Forms![SavePath], ,
,
"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