Ms Access Error 3164
Question Need help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers. It's quick & easy. How to fix error: Field cannot be update ? P: n/a Edy Chandra Hi, I'm doing a simple application for store. In my subform when I want to entry the record MS Acces appear msg "Field cannot be update". I've try to solve it with the possible causes (as show on error 3164): 1) if the currently table was locked by another user, eventually I'm the only person who use it. 2) I've checked that I didn't change the value of a control whose "Locked" property set to Yes. Please help me to find out what it cause? Nov 12 '10 #1 Post Reply Share this Question 1 Reply P: 83 orangeCat Have you read through the following to see if your problem is similar? http://bytes.com/topic/access/answer...cannot-updated Nov 16 '10 #2 reply Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. Similar topics Cannot update ODBC linked table even though I have R/W access to the table Moving a field into a Temp field receiving a [3027] Cannot Update. DB is read-only. Cannot Update Database through DataGrid & DataList Control i cannot update and addnew a database Issue with importing CSV file using JET. Error Message: 'Cannot update. Database or object is read-only. ' "Cannot update, databse or object may be read only" Using the MonthView Control But Cannot Update the Text Field on Another Form Cannot update. Database or object is read-only. Field Cannot be updated! Error "cannot update database or object is read-only" when updating MDB file in ASP Browse more Microsoft Access / VBA Questions on Bytes Question stats viewed: 4659 replies: 1 date asked: Nov 12 '10 Follow this discussion BYTES.COM © 2016 Formerly "TheScripts.com" from 2005-2008 About Bytes | Advertise on Bytes | Contact Us Sitemap | Microsoft Access / VBA Answers Sitemap | Microsoft Access / VBA Insights Sitemap Follow us to get the Latest Bytes Updates
error 3164, field can not be updated, when I try to pass a value to a field. This field, "Event ID," exists in the query my form is based on, but is not a visible control on the form. Private Sub EventDate_BeforeUpdate(Cancel As Integer) 'Created November 2006 - currently in testing 'If user attempts to change the date of the Last Updated event, this sub creates a _ new Event record and plugs the just-inputted data into it. This prevents user from _ incorrectly overriding Last Updated https://bytes.com/topic/access/answers/901678-how-fix-error-field-cannot-update data for all existing records tied to the current _ Last Updated Event record. Dim intNewEventDate As Date Dim intNewEventID As Integer Dim conEvent As Connection Dim rstEvent As Recordset intNewEventDate = Me.EventDate Cancel = True Set conEvent = CurrentProject.Connection Set rstEvent = New Recordset With rstEvent .Source = "Select * from Event" .ActiveConnection = conEvent .LockType = adLockOptimistic .Open .AddNew ![Event Type] = http://www.pcreview.co.uk/threads/error-3164-cant-update-field.2774235/ "Last Updated" ![EventDate] = intNewEventDate intNewEventID = ![Event ID].Value .MoveFirst End With rstEvent.Close Set rstEvent = Nothing conEvent.Close Set conEvent = Nothing Me.[Event ID].Value = intNewEventID ******Run-time error 3164********** Me.Requery Guest, Nov 5, 2006 #1 Advertisements Ken Snell \(MVP\) Guest Is EventID an autonumber field? If not, post more details about what it is and more details about your form's setup/design/properties. If it is an autonumber field, you cannot update such a field. -- Ken Snell
(РуÑÑкий)ישר×ל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)ëŒ€í•œë¯¼êµ (í•œêµì–´)ä¸åŽäººæ°‘共和国 (ä¸æ–‡)å°ç£ (ä¸æ–‡)日本 (日本語)  HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: "If .Updatable" statement doesn't detect https://social.msdn.microsoft.com/Forums/sqlserver/en-US/20627cf3-9ec0-40b8-8452-8f7a917632ab/if-updatable-statement-doesnt-detect-locked-state-of-a-record-and-the-code-attempts-to-update?forum=accessdev locked state of a record and the code attempts to update the record and triggers error message: Run-time Error '3164' Field cannot abe updated Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote Hi All, I'm trying to run a code (see code below) to walk through records in a recordset, ms access check if any of them isn't currently locked for editing by another user, and if it isn't, update it, display field values in the immediate window and proceed to the next record. Otherwise loop back to checking the record lock. The code seems to work except when I do lock one of the records in the ms access error recordset the VBA throws an error message (Run-time Error '3164' "Field cannot abe updated") at the field update line (see attached screen captures following the code). If I'm correct the "If .Updatable..." statement does whole nothing in this code. I can't find any posts discussing such issue. I would appreciate any suggestion on how to get this to work. Thanks in advance. Sub test() 'Update Projected Finish Dates Dim sqlJobJMJMach As String Dim rsJobJMJMach As DAO.Recordset sqlJobJMJMach = "SELECT [Machine.id],[Job.ID], [Machine.job_finish_date], [Job.finish_date] FROM Machine INNER JOIN" & _ "(Job INNER JOIN [Job-MachineJoint] ON Job.ID = [Job-MachineJoint].JobID) ON Machine.ID =" & _ "[Job-MachineJoint].MachID WHERE (((Job.ID)=52) AND (([Job-MachineJoint].Finished)=False))" Set rsJobJMJMach = CurrentDb.OpenRecordset(sqlJobJMJMach) With rsJobJMJMach If Not .BOF And Not .EOF Then .MoveLast .MoveFirst Do While Not rsJobJMJMach.EOF Line5: If .Updatable Then .Edit ![Machine.job_finish_date] = #12/14/2012# '[TempVars]![ProjFinDate] ![Job.finish_date] = #12/31/2012# '[TempVars]![ProjFinDate] Debug.Print rsJobJMJMach(0); rsJobJMJMach.Fields("[Job.ID]"); rsJobJMJMach.Fields("[Machine.job_finish_date]"); " " & _ rsJobJMJMach.Fields("[Job.finish_date]") .Update Else: GoTo Line5 End If rsJobJMJMach.MoveNext Loop End If .Close End With Set rsJobJMJMach = Nothing End Sub Les