I am trying to do a search in a subform.
I am trying to use the Recordset clone method.
I have a text box on my subform (txtSearch) and the ProcNumber is the field on the subform that I want to match.
I get a type mismatch on the line where I try to set rs=Me.RecordsetClone.
Any ideas why?
Here's my code:
Private Sub cmdSearch_Click()
Dim rs As Recordset
Dim strSearch As String
Set rs = Me.RecordsetClone
strSearch = Str(Me!txtSearch)
rs.Find "[ProcNumber] = " & strSearch
Me.Bookmark = rs.Bookmark
rs.Close
End Sub
Thanks
I am trying to use the Recordset clone method.
I have a text box on my subform (txtSearch) and the ProcNumber is the field on the subform that I want to match.
I get a type mismatch on the line where I try to set rs=Me.RecordsetClone.
Any ideas why?
Here's my code:
Private Sub cmdSearch_Click()
Dim rs As Recordset
Dim strSearch As String
Set rs = Me.RecordsetClone
strSearch = Str(Me!txtSearch)
rs.Find "[ProcNumber] = " & strSearch
Me.Bookmark = rs.Bookmark
rs.Close
End Sub
Thanks