Write conflict

D

David Howlett

I have a form with a large number of fields on it. When I run an Update
query that changes a lot of the fields that the form uses, I get the
following box on the screen:

Write Conflict
This record has been changed by another used since you started editing it
....

My choices at that point are to:
Save Record
Copy to clipboard
Drop Changes

Is there a way around this?

Again, if I have an open form and I programatically execute a query that
changes fields inside the table that the form uses, I get this box.

My code is:
db.execute("MyUpdateQuery")
me.recalc
me.refresh
 
P

PC Datasheet

Hi David,

I can't give you a specific answer without actually seeing what you are doing
but I can tell you where to look and what to do. This is caused by two different
actions making updates to the same record. In your case you probably entered
data in one or more fields or edited the data in one or more fields which places
the record in edit mode. Then you try to run the query that updates the
underlying data in the record which is in edit mode.

The solution is to save the record and refresh the form before the update query
is run.
 
D

David Howlett

Thanks,

I got the following code to work:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Refresh
db.Execute "qryUpdateFieldsDisplayedOnMyForm"
Me.Recalc
Me.Refresh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Write Conflict 8
Write Conflict 2
Write Conflict warning 3
write conflict 2
trying to minimize Write Conflicts in a multi-user database 64
Write conflict 1
"Write Conflict"? Why? 5
Write Conflict 2

Top