Update Query Write Conflict (1 Viewer)

Gismo

Registered User.
Local time
Today, 16:38
Joined
Jun 12, 2017
Messages
1,298
Hi All,

Compliments of the season to all

I run an update query after i have updated a control
it is a basic currency conversion query to update another control
after i have run the update query, i get an write conflict error
i need to choose between save record, copy or drop changes
this record is not being changed by any other user

why am I getting this error / warning?

1609920905137.png
 

isladogs

MVP / VIP
Local time
Today, 14:38
Joined
Jan 14, 2017
Messages
18,186
There could be many reasons for this.
For example, it will occur if you are trying to update a bound control on an open form 'externally'. In this case using an update query.
Or if the database is split with a SQL BE and the table being updated contains a bit field with null values....etc

You may need to give more details of your exact situation.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:38
Joined
May 7, 2009
Messages
19,169
if nobody is using the db other than you,
check the code of the form if it has an Update Query on it.
if it has, you can avoid by Updating the Form's Recordset instead.
 

Gismo

Registered User.
Local time
Today, 16:38
Joined
Jun 12, 2017
Messages
1,298
I have a after update macro on Weight (Kg) to update Weight (Lb) and then the same with currency
i am the only user on this file currently
after i have updated the control, the macro runs the update qry, saves and requery the other control
there is really nothing strange to this form but for some reason I am getting the message

1609923358237.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:38
Joined
May 7, 2009
Messages
19,169
that is why you are getting the error.
better fix it now before making the db multiusers.

the Form's recordset is but a snapshot of your record
on the table.

if you update the source table through SQL, and at same
time updating the Form's recordset, MSA will complain because
the record on the Table is Newer than the one you have on the Form (see the Message on Post #1).
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:38
Joined
Feb 19, 2002
Messages
42,970
If the form is bound, there is no need to use an update query. Just save the record after the field has been updated. Or just let the update happen naturally when you navigate to a different record or close the form.
 

Isaac

Lifelong Learner
Local time
Today, 07:38
Joined
Mar 14, 2017
Messages
8,738
I have a after update macro on Weight (Kg) to update Weight (Lb) and then the same with currency
i am the only user on this file currently
after i have updated the control, the macro runs the update qry, saves and requery the other control
there is really nothing strange to this form but for some reason I am getting the message

View attachment 87995
1. get rid of the macro and change to vba code.
2. in your new vba code, use the After update event of the weight (kg) control, to populate the weight (lb). but do not save the record in this code.
 

Users who are viewing this thread

Top Bottom