troubleshooting Question

How to: Update fields in code on a bound form in Access 2010

Avatar of rowek
rowek asked on
Microsoft AccessMicrosoft Applications
11 Comments1 Solution233 ViewsLast Modified:
We have a multi-user MS Access app that we have migrated up from Access 97 to Access 2000 then to Access 2003 without major issues. We are now migrating that same code to Access 2010 and we are recieving "Update or CancelUpdate without AddNew or Edit" with some legacy code.

The setup is simple.  We have a bound form called frmPeople that is bound to a query that joins a few tables. When the user does a search we find that record and display it in the form.  The old (and desired) behavior is the user could then type over existing data and it would be saved as soon as the textbox was exited.  Standard MS Access behavior since 1.0.  We are now running into two problems:
1) Every third or fourth update works, the rest throws the error above.
2) We used to be able to update the record's TimeStamp in code by simply setting the DateTime field to Now().  Because the field was a column in the underlying table the update would work.  Now that line of code fails every time.

Why is is necessary to Edit a record in a bound form in Access 2010?  What is the preferred method to ensure all updates are forced to the db and to update various fields in code?  The KB articles say to Edit the record first, update the desired fields, then Update the record, but I get lots of conflicts as to which event to call the Edit, modify, and Update process.  

Michael Carrillo
Information Systems Manager
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros