kufre wrote:
I have a Find command button on my form that I would like to use to
perform my search.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Usually, you can do something like this:
Private Sub cmdFind_Click()
Dim strCriteria As String
Dim rs As DAO.Recordset
' Set the criteria to values in different TextBoxes.
strCriteria = "col1 = " & Me!txtANumber
strCriteria = strCriteria & " AND col2 = '" & Me!txtAString & "'"
strCriteria = strCriteria & " AND col3 = #" & Me!txtADate & "#"
' Get the same Recordset as the form
Set rs = Me.RecordsetClone
' Try to find the data w/ the criteria
rs.FindFirst strCriteria
If Not rs.NoMatch Then
' Do something w/ the found data
MsgBox "Found"
Else
MsgBox "Not Found"
End If
' Clean up & exit
Set rs = Nothing
End Sub
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQji294echKqOuFEgEQKDXwCfaeAHk1C/NyqM+fkfwim/EDglcqAAnicz
LNoKy8EPJD31+LQ41Oc5xmg9
=TnnT
-----END PGP SIGNATURE-----