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

Apr 14

Total Zip Code Database Now Has Latitude and Longitude

One of the nicest features to add to an address data entry screen is to automatically fill the city and state fields when a zip code is entered. In conjunction with the US Postal Service, FMS offers the Total Zip Code Database which gives you the entire list of valid zip codes and their corresponding city and state names. Both the primary and secondary city names are provided. Speed up data entry, eliminate typos, and clean up existing data with Total Zip Code Database. We also include the list of common city names the USPS doesn't like with their corresponding corrections. The database is provided on an annual subscription basis with an initial list and 11 monthly updates.

In addition to the information provided by the USPS, the Total Zip Code Database also includes geospatial coordinates (latitude and longitude) for each zip code. We also provide a list of countries and states to simplify lookups, and module code and sample form to add this to your applications. The data is provided in a Microsoft Access MDB and ASCII files. 

For more information, visit the Total Zip Code Database page, view the zip code flier, or get the demo.

Total Zip Code Database