mattster1010
07-07-2008, 02:39 AM
Good Morning,
I have the following code to input criteria into a textbox called qrysearch that finds records based on a field called username:
Private Sub Command17_Click()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Username] = '" & Me![qrysearch] & "'"
Me.Bookmark = rs.Bookmark
End Sub
The code works, but it seems to find the first record in the detail section of the form and still list every other record, how do perform the same search only displaying records that equal qrysearch.text?
Cheers,
Mattster
I have the following code to input criteria into a textbox called qrysearch that finds records based on a field called username:
Private Sub Command17_Click()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Username] = '" & Me![qrysearch] & "'"
Me.Bookmark = rs.Bookmark
End Sub
The code works, but it seems to find the first record in the detail section of the form and still list every other record, how do perform the same search only displaying records that equal qrysearch.text?
Cheers,
Mattster