Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

How to Find Record using Combo Box List Selection or Type

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.

Step 1: Combo Box List Wizard

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.

Combo Box Wizard for Search or Find Data

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.

Step 2: Advanced Combo Box Features

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:

  • The auto-open drop-down list while typing
  • The list of options in Ascending order

The auto-open drop-down list while typing

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

The list of options in Ascending order

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.

Leave a Reply

Your email address will not be published. Required fields are marked *