Look up

  • Thread starter Thread starter Jerry P
  • Start date Start date
J

Jerry P

I have a database with a group of numbers and I want to be
able to have a form or something that I put a number in
and it compares it with the numbers in the database and
tell me true or false or yes or no if the number match one
in the database....
Thanks for your help
Jerry
 
Fairly easy to do.

Put a textbox on the form; you'll use the textbox to enter the number. Put a
command button on that formp; you'll use it to start the search.

In the OnClick event of the command button, you'll use code similar to this:

Private Sub cmdButtonName_Click()
If DCount("*", "TableName", "[FieldWithValue] = " & _
Me.txtBoxName.Value) = 0 Then
MsgBox "No Match Found"
Else
MsgBox "Match Found"
End If
End Sub
 
Back
Top