Action canceled by associated object?

A

Angela

I have a form (which contains subforms) which, when opened, checks to see if
there are any records in the recordset and if there aren't, it adds a new
record. The db was originally created in Access 97. When the code runs now,
in Access 2000, I get an error:

Run-time error 3426: Action canceled by associated object.

...and then the form won't open. The code is in the form open event and
looks like this:

If Me.RecordsetClone.RecordCount = 0 Then
Me.RecordsetClone.AddNew
Me.RecordsetClone.Update
End If

I read somewhere about a change to the recordsetclone from 97 to 2000 so
I've also tried this code but it gave the same error:

If Me.Recordset.RecordCount = 0 Then
Me.Recordset.AddNew
Me.Recordset.Update
End If

Does anyone know what is causing this error?

Thanks,
Angela
 
A

Angela

Sorry, this was a dumb mistake. Somehow my form was set to "no" for "allow
additions" which caused the error.
 

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