I have a form in acess. I have a field called last name. i want to search the whole form for that last name. So if i have 3000 records and i type smith into the last name text box and hit search it will bring me to that record were smith is. ANy thoughts, tips or code?
Dim myCriteria As String
myCriteria = "[LastName] = '" & Me.mySearchTxtBoxName & "'"
Me.Filter = myCriteria
Me.FilterOn = True
Assuming that your form RecordSource property is set to the table that holds all the names and the last name field in this table is named LastName. If Smith is enterd into the mySearchTxtBoxName TextBox and the code above is placed into a button beside this TextBox, then your form will populate with all the records of people that have the last name Smith.