Runtime error 3020

G

Guest

Can someone please help me with this error message..

It says "Runtime error 3020 update or cancel update without addnew or edit"
it occurs sometimes when trying to makes changes or edit a record.

I know this sounds like a dumb question but I can not find an update or add
new /edit button anywhere.

I am using a database that someone else made for me so if you can please
explain in elementary terminiolgy.
Thank you very much
 
G

Guest

There is an error somewhere in VBA code that is causing that error.
Open the VBA editor and do a search for .Addnew or .Edit
 
G

Guest

I think what you need to search for is Update, since it says you're trying to
do an Update or CancelUpdate without AddNew or Edit. It sounds like you have
a recordset open (let's call it rst for example) and are trying to execute an
Update command, e.g. rst.Update. The only way you can do an Update is if
you've first done rst.Edit to edit the current row of the recordset or
rst.AddNew to add a new row. In yourcase you're doing an rst.Update or
rst.CancelUpdate without having first done an Edit or AddNew. In design mode
for the form, Choose View from the menu, then Code to view the code. Once
you're in the VBA code, do an Edit, Find and find the word Update. Somehow
you're getting to a .Update or .CancelUpdate command without ever having
issued the .Edit or .AddNew command.
 
G

Guest

Thank you I will check this out and hopefully it will work. I'll let you
know. thanks
 
G

Guest

You are correct, Jim; however, I was going at it a little differently.
It is not an absolute that there is no AddNew or Edit, but perhaps the logic
is bypassing code.

The reason I did not start with Update is because searching on Update may
bring back unwanted results.

But, you do have a good point.
 

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