Hello all. I have an ADP database that when opening the Form I set the recordset of the form.
Set Me.Recordset = rs
When I try doing a bookmark I am getting an error with Me.Recordsetclone that says "Active X Component can't create object" Any idea?
Here is the code:
Public Sub findrecordbyvalue(ByVal pOrdernumber As String, obj As Object)
Dim rs As ADODB.Recordset
Dim str1 As String
On Error GoTo findrecorderror
str1 = "ordernumber = '" & pOrdernumber & "'"
obj.Requery
Set rs = obj.RecordsetClone
rs.Find str1
If rs.EOF Then
rs.MoveFirst
End If
obj.Bookmark = rs.Bookmark
Exit Sub
findrecorderror:
MsgBox err.Description
If err.Number = 2115 Then
Set rs = obj.RecordsetClone
rs.Find str1
obj.Bookmark = rs.Bookmark
End If
End Sub
Set Me.Recordset = rs
When I try doing a bookmark I am getting an error with Me.Recordsetclone that says "Active X Component can't create object" Any idea?
Here is the code:
Public Sub findrecordbyvalue(ByVal pOrdernumber As String, obj As Object)
Dim rs As ADODB.Recordset
Dim str1 As String
On Error GoTo findrecorderror
str1 = "ordernumber = '" & pOrdernumber & "'"
obj.Requery
Set rs = obj.RecordsetClone
rs.Find str1
If rs.EOF Then
rs.MoveFirst
End If
obj.Bookmark = rs.Bookmark
Exit Sub
findrecorderror:
MsgBox err.Description
If err.Number = 2115 Then
Set rs = obj.RecordsetClone
rs.Find str1
obj.Bookmark = rs.Bookmark
End If
End Sub