I've been working on this piece of code and can't figure out why I'm receiving Run-time error '3020' Update or Cancel Update without AddNew or Edit. I'm just trying to located a record id and allow the user to update the recordset.
'On Error GoTo Err_cmdFindRefId_Click
Dim intRefId As Long
Dim strBookMark As String
intRefId = InputBox("Enter Reference ID to Locate", "Reference ID Search")
strBookMark = Me.Bookmark
'Locate and display records based on Chargeback record number
With Me.RecordsetClone
.FindFirst "[ChargeBackRecordId] = " & intRefId
If .NoMatch Then
MsgBox "That Reference ID was not Located, " & vbCrLf & "Please try your entry again>" _
, vbExclamation, "Reference Id Search"
Me.cmdFind.SetFocus
Else
Me.Bookmark = .Bookmark
Me.IssueDate.SetFocus
End If
End With
Exit_cmdFindRefId_Click:
Exit Sub
Err_cmdFindRefId_Click:
MsgBox Err.Description
Resume Exit_cmdFindRefId_Click
End Sub
Start Free Trial