Article ID: 304146 - View products that this article applies to.
This article was previously published under Q304146
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
When you run a macro that uses the TransferSpreadsheet action to export a table or query to the Microsoft Excel file format, you receive the following error message:
Cannot update. Database or object is read-only.
This error message occurs when one of the following conditions is true:
To avoid this error message, when you set the FileName property, insert only the path to the file that you want to export. Do not surround the path with quotation marks or end the line with a carriage return/line feed.
Steps to Reproduce the Behavior
For additional information about another cause of this error message, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/295200/EN-US/ )ACC2002: "Cannot Update. Database or Object Is Read-Only" Error When You Convert an Uncompiled, Read-only Database
Article ID: 304146 - Last Review: January 31, 2007 - Revision: 5.3