Hi ,
I hope you will help me with this samll problem .
I am trying to export query off Access into Excel spreadsheet and I am using this code below:
DimstDocName AsString
DimtheFilePath AsString
stDocName = "Mediation4"
DoCmd.OpenQuery stDocName
MsgBox "Look on your desktop for the report."
theFilePath = " Y:\My Documents\UpdateChecks\Checks”
theFilePath = theFilePath & stDocName & " "
DoCmd.TransferSpreadsheet acExport, 10, reportName, theFilePath, True
EndSub
Where
Mediation4 is name of query
Y:\My Documents\UpdateChecks\Checks-directory where is file xsl is located (Chekcs in this case)
The access debugs this by :" A value you eneterd for the speadsheettype argument is invalid".
The code is in the click event of command box
I am trying to fugure it out but so far got no success.
Thank you in advance for advice how to fix it .
The Best Regards.