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
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