TransferSpreadsheet - runtime error 3027

G

Guest

I am trying to export a query to Excel 2000 using TransferSpreadSheet
function but it fails with error3027 ' Cannot update, database or object is
read-only'.

My code is below....
n.b. qry_JapanResale_kg_SKU_Mth is a crosstab query
Also the path I specified exists...

Function Macro1()

DoCmd.TransferSpreadsheet acExport, 8, "qry_JapanResale_kg_SKU_Mth",
"""K:\market\SDW\Japan Resale\test.xls""", True, ""

End Function



Alrternatively if I go directly to my query, right click export and save as
Excel 97-2000 then it works.

Why doesn't TransferSpreadSheet do the same?

Bruce
 
G

Guest

Allen,

I am using Access 2000 with SP3.

This article seem to refer to the problem as when Excel is linked to Access.
I don't want to link, rather I want to Export the results of my query to
excel (one-way only).
 
K

Ken Snell \(MVP\)

Too many " characters, it appears... try this:

DoCmd.TransferSpreadsheet acExport, 8, "qry_JapanResale_kg_SKU_Mth",
"K:\market\SDW\Japan Resale\test.xls", True
 

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