find records in access 2002 forms

  • Thread starter Thread starter TEKOR
  • Start date Start date
T

TEKOR

try this to find records in access 2002 forms


FindRecord "Name", "Alex"


Private Sub FindRecord(FieldName as string, Value as string)

If Not Me.Recordset.EOF Then
Me.Recordset.MoveFirst
Do
If Recordset(FieldName) = Value Then
Exit Do
End If
Recordset.MoveNext
Loop Until Recordset.EOF
End If

End Sub
 
Back
Top