I use a new ADODB.Recordset 'Find' method to move to a specific 'Part Number' in form. Occasionally, I will get a 2001 error 'You canceled the previous operation.'. I've bypassed the Before_Update and On_Current code to exclude that from causing the problem. It's an Access 2003 .ADP database connected to SQL Server 2000. The errors seem to occur on exactly the same PNs each time. If I avoided them the app would work fine all the time, but, of course, that is not reasonable. The knowledgebase didn't help and I don't have much 'help' for ADODB. Any help would be greatly appreciated.
Dim rs As New ADODB.Recordset
Dim varBookmark As Variant
Dim strCriteria As String
Set rs = Me.RecordsetClone
strCriteria = "[LRU Part Number]='" & Me.cboFindPN.Value & "'"
rs.Find(Criteria:=strCriteria)
If Not rs.EOF Then
varBookmark = rs.Bookmark
Me.Bookmark = varBookmark
Else
'"Not found"
End If
Set rs = Nothing
---------------------
scking@arinc.com
---------------------
Dim rs As New ADODB.Recordset
Dim varBookmark As Variant
Dim strCriteria As String
Set rs = Me.RecordsetClone
strCriteria = "[LRU Part Number]='" & Me.cboFindPN.Value & "'"
rs.Find(Criteria:=strCriteria)
If Not rs.EOF Then
varBookmark = rs.Bookmark
Me.Bookmark = varBookmark
Else
'"Not found"
End If
Set rs = Nothing
---------------------
scking@arinc.com
---------------------