This documentation is archived and is not being maintained.

ComboBox.ItemsSelected Property (Access)

You can use the ItemsSelected property to return a read-only reference to the hidden ItemsSelected collection. This hidden collection can be used to access data in the selected rows of a multiselect combo box control.

Version Added: Access 2007

expression .ItemsSelected

expression A variable that represents a ComboBox object.

The ItemsSelected collection is unlike other collections in that it is a collection of Variants rather than of objects. Each Variant is an integer index referring to a selected row in a list box or combo box.

Use the ItemsSelected collection in conjunction with the Column property or the ItemData property to retrieve data from selected rows in a list box or combo box. You can list the ItemsSelected collection by using the For Each...Next statement.

For example, if you have an Employees list box on a form, you can list the ItemsSelected collection and use the control's ItemData property to return the value of the bound column for each selected row in the list box.

The ItemsSelected collection has no methods and two properties, the Count and Item properties.

Show: