Article ID: 922133 - Last Review: November 3, 2006 - Revision: 1.2

An incorrect item may appear as the selected item when you select an item in a combo box control, in a drop-down list box control, or in a list box on an InfoPath 2007 form

On This Page

Expand all | Collapse all

SYMPTOMS

Consider the following scenario. You add a combo box control, a drop-down list box control, or a list box control to a Microsoft Office InfoPath 2007 form. You select a particular item in the list. In this scenario, an incorrect item may appear as the selected item. Therefore, you cannot select certain items in the list.

CAUSE

This behavior occurs if the control uses duplicate values for the Value properties of list entries. For example, this behavior occurs if the control contains values for list entries that resemble those in the following table.
Collapse this tableExpand this table
ValueDisplay Name
AOption A
AOption B
COption C
This is the expected behavior in InfoPath 2007. The control lets you type or select a value for the list entry that you want. When you type or select the value of the specific list entry, that value is replaced by the display name of the particular entry. The following table lists the behavior that occurs in this situation.
Collapse this tableExpand this table
ControlBehavior
Combo box controlInfoPath 2007 locates the first item that has a display name that matches the value that you typed or selected. Then, InfoPath 2007 displays that item.
Drop-down list box control or list box controlInfoPath 2007 locates the last item that has a display name that matches the value that you typed or selected. Then, InfoPath 2007 displays that item.

RESOLUTION

To resolve this behavior, specify unique values for each list entry.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the behavior

  1. Start InfoPath 2007, and then design a new blank form.
  2. In the Tasks pane, click Controls.
  3. Click Combo Box to insert a combo box control.
  4. Right-click the control that you inserted in step 3, and then click Combo Box Properties.
  5. In the Combo Box Properties dialog box, click the Data tab.
  6. Click Enter list box entries manually, and then click Add.
  7. Type a in the Value box, type Option A in the Display name box, and then click OK.
  8. Click Add.
  9. Type a in the Value box, type Option B in the Display name box, and then click OK.
  10. Click Add.
  11. Type c in the Value box, type Option C in the Display name box, and then click OK.
  12. Click OK, and then click Yes when you receive the following message:
    The default value in the choice list is not unique. Do you still want to accept the default value?
  13. On the Standard toolbar, click Preview.
  14. In the Select or type list, click Option A. Notice that Option A appears as the selected option in the list.
  15. Click Option B in this list. Notice that Option B does not appear as the selected option. Instead, Option A appears as the selected option.

APPLIES TO
  • Microsoft Office InfoPath 2007
Keywords: 
kbexpertisebeginner kbtshoot kbprb KB922133
 

Article Translations

 

Related Support Centers