Update Query Write Conflict (1 Viewer)

Gismo

Registered User.
Local time
Today, 22:31
Joined
Jun 12, 2017
Messages
766
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

CID VIP
Local time
Today, 20:31
Joined
Jan 14, 2017
Messages
14,441
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

error reading drive A:
Local time
Tomorrow, 04:31
Joined
May 7, 2009
Messages
11,536
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, 22:31
Joined
Jun 12, 2017
Messages
766
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

error reading drive A:
Local time
Tomorrow, 04:31
Joined
May 7, 2009
Messages
11,536
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, 15:31
Joined
Feb 19, 2002
Messages
31,106
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, 12:31
Joined
Mar 14, 2017
Messages
3,822
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