Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error 3020- Update or CancelUpdate without Addnew or Edit

16 views
Skip to first unread message

olat

unread,
Aug 9, 2001, 6:38:50 PM8/9/01
to
Please help, i have a client(access)/server(SQL 7.0)
application that sporadically comes up with this error
" Error 3020 Update or cancelupdate without addnew or edit"
I have tried unsuccessfully to trap it because it does not
occur every time its intermittent. Any ideas welcome.


Thanks

Geoffrey Barnes

unread,
Aug 9, 2001, 6:59:35 PM8/9/01
to
I assume that you have an open recordset that you are using the edit the
data. Prior to issuing the recordset.Update method, you have to tell the
database that you are editing the data. The recordset.AddNew or
recordset.Edit commands are the ones used to make this notification.

So, if you have a recordset open (rstMyRecordset), and you want to edit the
current record, your code would look something like the following:

rstMyRecordset.Edit

rstMyRecordset.Fields("Field1") = 1234
rstMyRecordset.Fields("Field2") = 5678

rstMyRecordset.Update


olat <iba...@hotmail.com> wrote in message
news:108f501c12124$0f60b5a0$9be62ecf@tkmsftngxa03...

Allen Browne

unread,
Aug 10, 2001, 12:10:48 AM8/10/01
to
It's also possible to get this error if you programatically move
to another record in a bound form without explicitly saving the
record.

Before a Requery, setting the form's Bookmark, changing the Filter
or OrderBy, reassigning the RecordSource, etc., insert:
If Me.Dirty Then
Me.Dirty = False
End If

--
Perth, Western Australia
Tips for MS Access users at:
http://odyssey.apana.org.au/~abrowne

0 new messages