Results 1 to 4 of 4
  1. #1
    bbrazeau is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    101

    Error # 3164 "field cannot be updated"

    I found that in my case this error was caused when I was trying to update a record on a form who's data source was a query and I had set a "Default value" for one of the fields.
    Answer: remove the "Default value".Hope this Helps

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    That seems odd. DefaultValue property should not cause a field to not be editable even if the RecordSource is a query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bbrazeau is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    101
    Hi June, Just to be clear, I got the error, but after dismissing it the changes were made anyways. Just unsetled me to have an error popping up like that all he time in my application. I removed the default values I was setting "0" and the errors went away. I don't know if I had applied the default values at the table level if the error would persit. I may try it and find out.
    I got what follows below directly from MS web site:

    Symtoms
    When you type data into a new record on a form that is based on a query or an SQL statement, you receive one of the following error messages:
    Field cannot be updated.
    -or-
    Multiple-step operation generated errors. Check each status value.
    -or-
    Start position is before the beginning or past the end of the rowset. No rows were returned.
    When you click OK, you can continue to edit, and then you can save the record.

    Cause
    This behavior occurs when you try to update a read-only field in a record by using either the DefaultValue property or Visual Basic for Applications.

    More information
    When you create a form that is based on a query, any control that is bound to a query field that contains an expression is read-only. Because the
    query expression is not bound to any specific field in the underlying table, you cannot edit the values in these fields. However, when you set the
    DefaultValue property of such a control, Access tries to write a new value to that control every time that you add a new record.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You mean you had set the DefaultValue property of a form control with an expression, not field in table. That does clarify and makes sense.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  2. Replies: 2
    Last Post: 03-08-2013, 12:59 PM
  3. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  4. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  5. Replies: 8
    Last Post: 11-12-2010, 10:55 AM

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