• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Forms open as Read Only

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
rawilken
Asked:
rawilken
  • 10
  • 10
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
rawilkenAuthor Commented:
No, one table per form. The key field is in each form. Besides, the recordset type for all was set for inconsistent updates.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
rawilkenAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
rawilkenAuthor Commented:
Literally when the form is opening!
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
rawilkenAuthor Commented:
No zip file either. Boggles my mind too!
0
 
rawilkenAuthor Commented:
Not read only, remember I can make updates to tables directly.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
rawilkenAuthor Commented:
might
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Try that.  If same problem, upload db.

mx
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Even if you just get a few records in the table ....

mx
0
 
rawilkenAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Sooo ... this only happens on a remote connection ?

mx
0
 
rawilkenAuthor Commented:
No this problem happens using local connection to SQL Server.
0
 
rawilkenAuthor Commented:
Found the error in the code. It was missing an Exit Sub statement.
0
 
rawilkenAuthor Commented:
it was an error I eventually found in my own code, on my own
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now