Search Button is exactly what im looking for.
Ok well here is what you are going to need to do
Once you are have your form created with all the feilds you would like displayed, you are going to create a
BOUND text box. (Bound means that it is connected with a feild in a table) in this example i will use LastName.
1.Once you have created your bound text box ( i can tell you how to do this if you don't know). You will wnat to create a blank button next to it.
2. Once you have created the button place this code in the "OnClick" event of the button. You are going to have to put the appropreate names in the corrisponding places
- Private Sub ButtonsName_Click()
-
If IsNull(TextboxesName) = False Then
-
Me.Recordset.FindFirst '[FeildYourSearchingFor]=' & TextboxesName
-
Me!TextboxesName = Null
-
If Me.Recordset.NoMatch Then
-
MsgBox "No record found", vbOKOnly + vbInformation, "Sorry"
-
Me!TextboxesName = Null
-
End If
-
End If
-
End Sub
This code will search, and if there is no result it will pop up a message telling the user there was not record found, and it will clear the txt box after the search is completed.