CancelUpdate message

G

Gary

I have two subforms on this on main form.
One subform contains relevant contact data for respective building jobs and
the other subform contains pictures of the particular record.

when using the navigation bar at the bottom of the screen to move from one
record to another, I eventually get the following message:
"Update or CancelUpdate without AddNew or Edit"
It essentially prevents me from moving from record to record using the
navigation bar.
What is it telling me ?
 
A

Allen Browne

Before you can move to another record, Access must save the current one. You
can receive this message if you have a record that cannot be saved, e.g. a
required field is not present, or a validation rule is not met.

The first thing to check for is any code that dirties the form
unnecessarily. For example, if you have code in Form_Current where you
assign a value to a bound control, you are forcing Access to re-save every
record you visit.

If that does not describe your situation, it is also possible that the code
for this form is corrupted. A decompile may help. Suggested sequence:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.
 

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