MS Access provides many features. For example, you can filter records in a datasheet or form as you type. Once done, any characters you type in the search field will filter the results to only show records that match the characters you have typed. This feature can be useful for quickly locating specific records without having to manually search through the entire dataset.
Probably, Microsoft Access search as you type is one of the most useful tools you can add to your MS Access program as it will automatically filter your form for quick, easy and more professional search. However, the steps to create it is very easy.
The below is the steps we will follow. Of course, you can download one of our examples and easily import it to your current database and do the necessary changes accordingly:
- First, Create a table with all fields you need.
- Now, create a continuous form with all fields you need.
- Insert a combo box and name it “cboFindAsUTypeField” since we’ll use this name within the VBA codes of our example.
- Row Source Type: “Value List”
- Column Count: 5
- The column Widths should be: 1″;0″;0″;0″;0″
- Under Events > After Update, use the Code Builder and paste this VBA Code: “txtFindAsUTypeValue.SetFocus” to set the focus on the search text field.
- Insert a text field and name it “txtFindAsUTypeValue”. Similarly, we’ll use this name within the VBA codes.
- Under Events > Form Load , use the code Builder and paste the following VBA Code:
Call FindAsUTypeLoad(Me)
txtFindAsUTypeValue.SetFocus
- Finally, import the Module we used in our MS Access Search As You Type.
*Note: The author of this module is Mr. Allen Browne
In addition, you may also have a look at our post to “Search As You Type” for single field.