Why do I get a write conflict error in a single user environment?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Access 2007 (Beta) I have a form with a command button that, via a macro,
runs a couple of queries and then updates the form. I keep getting a "write
error" message which seems to say that another user has changed a record
since I started editing it. It gives me the option to save the record and
then everything proceeds as it should - but it's annoying. I can't find any
reference in the Help files to "write errors".
 
That "other" person is your code!!!

This usually occurs when you have a form, start to edit. At this point, the
form has data WAITING to be written back to the table.

Now, you go and run some code..and that code happens to modify the above
same record. Ms-access says, hey, another user, or something, or someone has
modified the record...what to do???

The simple solution to force a data save in your macro..and THEN run the
code update code...This will fix this..

So, at the start of the macro, for the action use a

RunCommand, and for the "command", select saverecord. That should fix
this...

So, the problem is that you update code is modifying the record right under
ms-access nose.....
 
Albert D. Kallal said:
That "other" person is your code!!!

This usually occurs when you have a form, start to edit. At this point, the
form has data WAITING to be written back to the table.

Now, you go and run some code..and that code happens to modify the above
same record. Ms-access says, hey, another user, or something, or someone has
modified the record...what to do???

The simple solution to force a data save in your macro..and THEN run the
code update code...This will fix this..

So, at the start of the macro, for the action use a

RunCommand, and for the "command", select saverecord. That should fix
this...

So, the problem is that you update code is modifying the record right under
ms-access nose.....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)


Many thanks. Obvious when it's explained!!!
 

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


Back
Top