I have a form that among other things list the first and last names of customers. I need to add a command button that will allow the user to search on last name. Is there a way to program the command button to utilize Access' built in search feature (i.e. CTRL F) to do this?? If so, how could I just limit the search to 1 field (Last name)?
Incorporate/Utilize Built In Search Function
Collapse
X
-
Tags: None
-
Why not simply use <Ctrl> + <F> ? If the cursor is in the last name field that' s the only field that will be searched.
This code will do the same thing from a Command Button
Linq ;0)>Code:Private Sub SearchButton_Click() Screen.PreviousControl.SetFocus DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70 End Sub -
I might be way off but take a look at either of these utilities. I use the first one to search the database for existing clients which I guess is similar to what you are looking for (although it filters the records as opposed to just taking you to a specific record)
Search criteria - http://allenbrowne.com/ser-62.html
Find as you type - http://allenbrowne.com/AppFindAsUType.htmlComment
Comment