Apr 24

Top Five Tips for Using Combo Boxes on Microsoft Access Forms

Country ListMicrosoft Access combo boxes let you display data for users to select values from predefined lists. Using them effectively simplifies data entry and accuracy.

Brush up on the ComboBox Basics from Microsoft, and check out our Top Five Tips for using Combo Boxes on Microsoft Access forms. Each of them has articles describing them in more detail.

1. Set Important ComboBox Properties

To use combo boxes effectively, learn about the following properties:

* LimitToList: Set this property to Yes to prevent values that are not in your list.
* AutoExpand: Set this property to Yes to automatically select a matching value in the list as you type.
* ListRows: Set this value to a high value so that the drop down shows as many list items as space allows.

2. Properly Validate a ComboBox

Use the ListIndexproperty instead IsNull to properly validate that a valid ComboBox list item is selected.

3. Select the First Item in a ComboBox on a Microsoft Access Form

Use the following syntax to automatically select the first item in a ComboBox when the form loads, or when the value of another control on the form changes:

Me.ControlName = Me.ControlName.ItemData(0)

4. Create Cascading ComboBoxes on Microsoft Access Forms

On a form with multiple ComboBoxes, you may want to make the selection in one ComboBox limit the choices in another ComboBox. To do this, add code to the “AfterUpdate” event of the first control that updates the RowSource property of the second control.

Microsoft Access Cascading Combo Boxes

5. Enter a Zip Code and Auto-Fill the City and State Names

Use Total ZipCode Database from FMS to automatically fill a ComboBox with a list of valid City / State combinations when the user types a zip code.

Microsoft Access Cascading Combo Boxes