Update or Cancelupdate without Addnew or Edit

A

Aaron

Hello,

I've setup a basic data entry form for 3 computer in my
manufacturing plant. They all use the same form because
one area needs to update the same records as in other
areas, and hence I have a timed event to requery the
database to update the forms. Most of the time this works
very well. However, sometimes, my folks get the error:

Update or Cancelupdate without Addnew or Edit

I have tried to get the error myself and believe that it
is occuring when one of my folks will be typing in an
entry and the form requeries. After the requery, if they
finish typing the item and tab or enter to go to the next
field, they receive the error. The problem is that this
is not always the case, because it seems like sometimes it
works. My folks are getting frustrated with this error.
Can anyone help?

Thanks much,
Aaron
 
A

Allen Browne

Aaron, the first thing would be to ensure that all 3 computers have the
latest version of JET.

Assuming this is Access 2000 or later, locate msjet40.dll (typically in
windows\system32), and right-click. Under Properties, choose the Version
tab. If you do not see 4.0.0.8xxx, then go to http://support.microsoft.com,
downloads section, and get JET 4 SP8.

If the problem still occurs after that, try adding explicit saves to your
code before anything that could require the record to be saved, such as a
requery, filter, orderby, reassigned recordsource, moving record, closing
form, etc, etc. The explicit save does help avoid errors. We use:
If Me.Dirty Then
Me.Dirty = False
End If
because that code is explicit about which form to save the record in.

Presumably you have split the database so each workstation has its own copy
of the front end.
 
Joined
Aug 23, 2006
Messages
1
Reaction score
0
Read Aaron's answer and used the "Dirty" code. Not sure how or why it works, but it did for me in a similar problem. Used it on-exit event. Thanks, Aaron!
 

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

Top