Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


Resolution

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

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB922133, kbprb, kbtshoot, kbexpertisebeginner

↑ Back to the top

Article Info
Article ID : 922133
Revision : 3
Created on : 11/3/2006
Published on : 11/3/2006
Exists online : False
Views : 245