ListItemID Property

Applies To   See Also

Specifies the unique ID number for the selected item in a ComboBox or ListBox control. Not available at design time; read-write at run time.

Syntax

Control.ListItemID[ = nItemID]

Settings

nItemID

The settings and interpretations for the ListItemID property are:

Setting Description
– 1 Indicates no items selected. For a combo box, it means that the user has entered a value not in the list.
1 (or any number greater than 1) The item ID of the selected item.

Remarks

If an item is removed from a list using the RemoveListItem method, all remaining items retain their unique identification numbers. When an item is added to a list using the AddItem method, and the Sorted property is set to false (.F.), nItemID is assigned the lowest number available. When an item is added to a list using the AddListItem method, and the Sorted property is set to false (.F.), you can assign any number to nItemID.