Results 1 to 4 of 4
  1. #1
    Robeen is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596

    Cannot update. Database or object is read-only. Error # 2950..

    Hi,

    At new workplace, network, permissions . . .

    I created a REALLY simple Macro in MS Access 2010:
    SetWarnings = No,
    OpenQuery = Runs a delete query to empty a table [right now 9 records],
    RunCode = Runs code that reads a Text file and writes parsed data [right now 9 rows] to a table,
    ImportExportSpreadsheet = exports results of a query [same 9 records] to a new spreadsheet in my Documents folder [I also tried exporting to C:\ . . .].

    The Macro crashes on the ImportExportSpreadsheet step of the Macro - with the error in the subject line of this post:
    Cannot update. Database or object is read-only. Error # 2950.

    I've done this a hundred times at other sites - so I'm guessing this is permissions-related? . . . but I don't know what is causing the problem.



    I am able to create, modify, delete a spreadsheet to either of the locations [My Documents, C:\] - but I just cant do it from the Macro.

    I'd appreciate any help!

    Thanks!!

  2. #2
    Robeen is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Just as a test, I created a separate Macro with only a RunCode Action.
    The Action runs code that copies a file [I tried with a .txt file and a .xlsx file] from my documents and writes the copy [with "Copy" added to the file name] to the same folder. No problem there - the copy works just fine. So Access IS able to write to that folder.
    . . . not sure how - but that might help towards a solution?

    Thanks again!!

  3. #3
    Robeen is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I just tried one more thing:
    I right-clicked the query name [in the Navigation Pane].
    Selected Export -> Excel
    Provided the path & File Format etc & clicked OK . . .
    And it worked. no problem executing the export manually in this way.

  4. #4
    Robeen is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I found a way around it:
    I put a "DoCmd.TransferSpreadsheet acExport. . ." in the code I was already running prior to the macro action ImportExportSpreadsheet - and the export works fine.

    No idea why the Macro Action will not work for me!

    Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error: "Cannot update. Databse or Object is read-only" Issue
    By excellenthelp in forum Programming
    Replies: 6
    Last Post: 05-10-2022, 04:20 AM
  2. Replies: 2
    Last Post: 12-19-2014, 07:41 AM
  3. Replies: 5
    Last Post: 04-22-2013, 12:32 PM
  4. Cannot update. Database or object is read-only ERROR
    By Namibia in forum Import/Export Data
    Replies: 2
    Last Post: 06-05-2012, 05:32 PM
  5. Runtime Error '3027': Database or object is read only
    By 4x4Masters in forum Programming
    Replies: 4
    Last Post: 06-08-2010, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums