By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

Write Conflict this record has been changed by another user

P: n/a
RC
I am getting the following error message.
"Write Conflict this record has been changed by another user since you
started edting it. If you save the record, you will overwrite the
changes...."

I have an Access 2002 database running on a single PC, the front and
backend have not been separated yet. I have a form where I use a text
box to jump from record to record. The form has about 12 bound text
boxes on it. The table that is the datasource for the Form only has
about 15 records in it. The user first jumps to a new record, then
changes any information in the text boxes and then jumps to the next
record. When the current record is left (jumped away from) the record
is saved. This works ok for the first 12 or 15 times that I make
changes to record and then I start getting the Write Conflict error.
Once the error message starts I continue to get it even if I close the
database and close and restart Access. If I click "Save Changes" on
the error message I sometimes get characters in the database (for that
record) that look like Japanese or Chinese and if I continue the
database will crash. If I click "drop changes" than it doesn't
corrupt the database but I continue to get the error.
I use the following code on the AfterUpdate event of a ComboBox.

Private Sub GoToSerialNumberComboBox_AfterUpdate()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = Me.RecordsetClone
rs.Edit
If Me.CheckCD.Value = True Then
rs.Fields("CD") = "Yes"
Else
rs.Fields("CD") = "No"
End If
rs.Update
If Me.Dirty Then
Me.Dirty = False
End If
If Not IsNull(Me.GoToSerialNumberComboBox.Column(1)) Then
rs.FindFirst "[SerialNumber] = """ &
Me.GoToSerialNumberComboBox.Column(1) & """"
Me.Bookmark = rs.Bookmark
Set rs = Nothing
End Sub
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"RC" <rc*********@yahoo.com> wrote in message
news:3c**************************@posting.google.c om...
I am getting the following error message.
"Write Conflict this record has been changed by another user since you
started edting it. If you save the record, you will overwrite the
changes...."

I use the following code on the AfterUpdate event of a ComboBox.

Private Sub GoToSerialNumberComboBox_AfterUpdate()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = Me.RecordsetClone
rs.Edit
If Me.CheckCD.Value = True Then
rs.Fields("CD") = "Yes"
Else
rs.Fields("CD") = "No"
End If
rs.Update
If Me.Dirty Then
Me.Dirty = False
End If
If Not IsNull(Me.GoToSerialNumberComboBox.Column(1)) Then
rs.FindFirst "[SerialNumber] = """ &
Me.GoToSerialNumberComboBox.Column(1) & """"
Me.Bookmark = rs.Bookmark
Set rs = Nothing
End Sub

Try using the forms Recordset property instead of RecordsetClone.



Nov 13 '05 #2

P: n/a
RC
Thank You Sir ! That was simple. It seems to have fixed the problem.
For good measure I also changed the text boxes to save the record
after each box is updated. In the AfterUpdate event for each text box
I added:
If Me.dirty Then
Me.dirty = False
End If

"John Winterbottom" <as******@hotmail.com> wrote in message news:<2s*************@uni-berlin.de>...
"RC" <rc*********@yahoo.com> wrote in message
news:3c**************************@posting.google.c om...
I am getting the following error message.
"Write Conflict this record has been changed by another user since you
started edting it. If you save the record, you will overwrite the
changes...."

I use the following code on the AfterUpdate event of a ComboBox.

Private Sub GoToSerialNumberComboBox_AfterUpdate()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = Me.RecordsetClone
rs.Edit
If Me.CheckCD.Value = True Then
rs.Fields("CD") = "Yes"
Else
rs.Fields("CD") = "No"
End If
rs.Update
If Me.Dirty Then
Me.Dirty = False
End If
If Not IsNull(Me.GoToSerialNumberComboBox.Column(1)) Then
rs.FindFirst "[SerialNumber] = """ &
Me.GoToSerialNumberComboBox.Column(1) & """"
Me.Bookmark = rs.Bookmark
Set rs = Nothing
End Sub

Try using the forms Recordset property instead of RecordsetClone.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.