Write Conflict

B

bw

On closing my form, I get a Write Conflict message as follows:
"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,
etc.

There are three buttons to choose:
Save Record
Copy to Clipboard
Drop Changes
I choose to "Drop Changes" to satisfy the Write Conflict.

The "Conflict" is being caused by the following code:
DoCmd.OpenQuery "qryReportUpdate", acNormal, acEdit

How do I prevent this message from being displayed?

Thanks,
Bernie
 
G

Graham Mandeno

Hi Bernie

I'm assuming that this happens when you have edited the current record in
the form and that the query is updating the same record.

If so, then it should be fixed by inserting the following line of code
before the DoCmd.OpenQuery:
If Me.Dirty then Me.Dirty = False
This will cause the altered record to be saved before the query is run.
 
B

bw

Thanks Graham, that did it.
Bernie



Graham Mandeno said:
Hi Bernie

I'm assuming that this happens when you have edited the current record in
the form and that the query is updating the same record.

If so, then it should be fixed by inserting the following line of code
before the DoCmd.OpenQuery:
If Me.Dirty then Me.Dirty = False
This will cause the altered record to be saved before the query is run.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

bw said:
On closing my form, I get a Write Conflict message as follows:
"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, etc.

There are three buttons to choose:
Save Record
Copy to Clipboard
Drop Changes
I choose to "Drop Changes" to satisfy the Write Conflict.

The "Conflict" is being caused by the following code:
DoCmd.OpenQuery "qryReportUpdate", acNormal, acEdit

How do I prevent this message from being displayed?

Thanks,
Bernie
 

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


Top