Write Conflict Issue

S

Steve S

I upgraded an Acess 97 app to Access 2003. I use a form to update data in a
recordset. In the 97 app I used the DoCmd.runcommandAcSaveRecord to save
the record, but it won't work in the 2003 app. Whenever I try to save the
record, I get the message "This record has been changed by another user
since you started editing it. If you save the record, you will overwrite the
changes the other user made. ...

At this point I can save the record, copy to clipboard or drop changes.

Can someone tell me how to get around this issue?

Thank you
 
A

Albert D.Kallal

Dump the use of the runcomandAcSaveRecrd...

The write conflict occurs when another person, (or another form, or some
code) changes the data on form that has PENDING writes.

So, if you edit some data in a form, but then try to open another form, or
run some code that modifies the record, then which one wins?

The simply solution is to *ALWAYS* force a disk write when you open another
form that is bound to the same table, or *always* force a disk write when
you execute some code that can modify the same record as the form. Thus,
when that code returns..there is no pending writes to be done...and no
message...

I use

me.Refresh

---- now, run you code here...

Many here also suggest using

if me.Dirty = true then
me.Dirty = false
end if

The above is 3 lines of code in place of the one line of code me.Refresh --
however, me.Refresh can cause more network traffic, especially in a
continues form.
 

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"? Why? 5
Write Conflict 2
write conflict 3
trying to minimize Write Conflicts in a multi-user database 64
Write Conflict warning 3
Write conflict 1
general conflict question 1

Top