When working with ComboBoxes and ListBoxes, we often find the need to select the first item in the list by default. This can be done when the form loads, or when the rowsource values of the ListBox or ComboBox are changed.
We’ve written a new paper containing an explanation and sample database of how to do this with the ItemData(0) property.
Our example database contains a form with a ComboBox containing ProductCategoties, and a ListBox containing Products.
When the form loads, it selects the first Category in the list. When the Category is changed, the Products list is updated, and the first product is selected.
To learn more, read our tip on Microsoft Access Forms: Selecting the First Item in a ComboBox or ListBox and download our sample database.
In Microsoft Access, a common need is to have multiple combo boxes or list boxes on a form, and to have the selection in one combo box limit the choices in a second combo box or listbox. For example, consider an Address form containing State and City lookups. When you select a state, you want the list of cities list to be limited the selected state.
This is known as cascading combo boxes or synchronized combo boxes.
We recently posted a tip and demo database containing a sample of species, both plants and animals, categorized by their taxonomic rank (kingdom, phylum, class, order, family, and genus). When you select the value “Animal” from the Kingdom combo box, the Phylum combo box is updated to only show Animal phylum. The Species list box is also filtered by your selection.
To learn more, read our Microsoft Access Cascading Combo Boxes tip and download our sample database demonstrating how to create cascading combo boxes and list boxes.