Solved

Forms open as Read Only

Posted on 2011-09-26
20
267 Views
Last Modified: 2012-05-12
I have three forms that access three different tables. All the tables are linked to SQL Server tables. The tables when opened directly are fine. I can add and edit. However when I access the same tables through forms desiged for users to have access to, the forms all open with a message box error 3027 cannot update. Object is read only.
0
Comment
Question by:rawilken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 10
20 Comments
 
LVL 75
ID: 36600685
Is Allow Edits set to Yes (see image)

Is there more that one table in the Recordsource of the form, eg a query with more than on table? If so, try the Recordset Type setting shown.

mx
Capture1.gif
0
 

Author Comment

by:rawilken
ID: 36600742
No, one table per form. The key field is in each form. Besides, the recordset type for all was set for inconsistent updates.
0
 
LVL 75
ID: 36600818
Humm.  btw, Inconsistent updates only applies if there is more than on table in a query driving the form.

Must be something with SQL Server ... or I'm forgetting something.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 75
ID: 36600827
You get this error *as* the form opens?  Is there some code in the Open, Load or Current event that is trying to modify a field(s) ?

mx
0
 

Author Comment

by:rawilken
ID: 36601514
No code in load or current. I is not likely SQL Server as I reported I can open the table directly in MS Access and edit records. The edits are only disallowed in the forms.
0
 
LVL 75
ID: 36601552
Ok ... so when exactly does this error occur ? When you try to edit/add a record ? Or literally when the Form is opening?

mx
0
 

Author Comment

by:rawilken
ID: 36601722
Literally when the form is opening!
0
 
LVL 75
ID: 36601767
Well ... unless it's something specific about being linked to an SQL table, I'm not seeing how that error can occur without some field(s) update attempt ... which would have to come from some code trying to modify a field(s).

And I see the actual error is

accesserror(3027)
Cannot update.  Database or object is read-only.
Is the DB somehow being opened Read Only ?  Any chance it's inside of a Zip file ?

mx
0
 

Author Comment

by:rawilken
ID: 36601877
No zip file either. Boggles my mind too!
0
 

Author Comment

by:rawilken
ID: 36601881
Not read only, remember I can make updates to tables directly.
0
 
LVL 75
ID: 36601902
"remember I can make updates to tables directly."
Yeah.  And you mean from within the db by opening a linked table.

Is one of the SQL tables small enough wherein (as a test) you could create a local table, then use that is the RecordSource to a form that has this issue ?

mx

0
 

Author Comment

by:rawilken
ID: 36601920
might
0
 
LVL 75
ID: 36601926
Try that.  If same problem, upload db.

mx
0
 
LVL 75
ID: 36601930
Even if you just get a few records in the table ....

mx
0
 

Author Comment

by:rawilken
ID: 36602008
Can't get access to the db now. It is on a remote PC. I can't connect to remote PC. Might be locked, off, or in use. I connect remotely to work on it. Will either try later tonight or tomorrow.
0
 
LVL 75
ID: 36602015
Sooo ... this only happens on a remote connection ?

mx
0
 

Author Comment

by:rawilken
ID: 36990125
No this problem happens using local connection to SQL Server.
0
 

Accepted Solution

by:
rawilken earned 0 total points
ID: 37028274
Found the error in the code. It was missing an Exit Sub statement.
0
 

Author Closing Comment

by:rawilken
ID: 37052383
it was an error I eventually found in my own code, on my own
0
 
LVL 75
ID: 37053478
?
0

Featured Post

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access / SQL Server - ODBC Problems 16 60
Outlook VBA question - How do I mark a message as read 2 60
access vba 5 57
Using a combo box to search a form. 3 36
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question