473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Write Conflict this record has been changed by another user

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
2 15366
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jim S. | last post by:
I had this problem where a user would attempt to change a record, and always get the 'write conflict', and that another user had changed the record... even though no other users were on the...
6
by: Max | last post by:
Hi, I have SqlServer 2000 as back end and Access 2000 as front-end. All tables from Sqlserver are linked to Access 2000. I am having write conflict problem with one of my form which is bound to...
0
by: mollyf | last post by:
I have an Access 2000 front end with a SQL Server 2000 back end. I have about 15 users using the database at any given time and sometimes a problem comes up where 2 people are accessing the same...
0
by: Smriti Dev | last post by:
Hi, I have a ms access table table which is linked to a mysql database table. I have used a ms access form to edit records. However, when I attempt to edit a record I get a write conflict error...
5
by: Simon | last post by:
Dear reader, I have two Forms they are both working with dada from the same tables. By typing in some changes in Form-B the changes are also visible in Form-A. There is no record lock...
1
by: lorirobn | last post by:
Hi, I have a query that I have been using as a record source for a form with no problems. I just created a new "addnew" form, and added 20 records to the table with this form. The problem I...
1
by: S.Dickson | last post by:
I have a database with access as front end and Mysql as back end. I am gettting the following 'Write Conflict' Error. when i am on my order form, This form does has a subform where i enter all the...
6
by: jpatchak | last post by:
Hello, I have a main form with one subform. I have a command button on the main form to delete the current record. Below is my code. The tables on which the main form and subform are based...
0
by: Rico | last post by:
Hello, I have an Access 2002 front end that is connected to an SQL Server 2000 back end. The ODBC links connected to the front end are DSNless and have indexes, so they are updatable. When I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.