Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
There are several methods of finding records in a form based on the type of data and the required outcome. An efficient, quick method like Find Record using Combo Box from a potentially vast dataset is extremely important to improve the user experience.
Click to Subscribe
Watch the Video tutorial
In the default view of the Continuous Form spare some space in the Header Section. Select Combo Box from the Form Design menu and draw it. Select “Find a record on my form based on the value I selected in my combo box” and click on Next.
Add a Text data type field like Name, City, or Address field into the selected field side. Leave the “Hide Key column” option selected. All possible list options will be reflected. Hit Finish after assigning the label.
All done, now you can select the option from the drop-down and the record will be found.
Another use of this simple method is to find a record by typing in the Combo Box.
We are going to transform the Combo box into a more useful and improved search feature. To make it possible, there will be 2 major advancements made:
Start the VBA Code from the “On Key Down” Event of the Combo Box. Here is the code:
Private Sub Search1_KeyDown(KeyCode As Integer, Shift As Integer)
Me.Search1.Dropdown
Me.Search1.SetFocus
End Sub
To make the list options in Ascending order, open the Row Source from the Data Properties. The Query builder will appear. Select “Ascending” from the Sort row of the field.