Skip to content

Making the Description Field Display in a Closed Combo Box

How to make the combo box display the DistrictName value when the combo box is closed.

Q:  Mary V. writes:  “I have a combo box that is bound to a DistrictID field, but the drop-down list shows a descriptive field, DistrictName.  (The column widths are 0; 2).  This works fine for storing the right value in the bound field, but users don’t want to see a 14 in the combo box after selecting a value – they want to see Denver.  How can I make the combo box display the DistrictName value when the combo box is closed?”

A:  One way to do this is to swap the order of the columns in the combo box’s row source, so that DistrictName is first and DistrictID second.  Make the column widths 2; 0 and set the Bound Column value to 2.  This will save the DistrictID field to the bound field, but display the DistrictName field even when the combo box is closed.  If you need to pick up the DistrictID from the combo box in VBA code, use the following syntax:

Forms![frmDistricts].Column(1)

 

Which refers to the second column of the combo box, since column numbering is zero-based in code.

About this author