MultiSelect Property - Microsoft Support (2024)

Access for Microsoft 365 Access 2021 Access 2019 Access 2016 Access 2013 More...Less

Applies to

ListBox Object

You can use the MultiSelect property to specify whether a user can make multiple selections in a list box on a form and how the multiple selections can be made. Read/write Byte.

expression.MultiSelect

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

The MultiSelect property uses the following settings.

Setting

Visual Basic

Description

None

(Default) Multiple selection isn't allowed.

Simple

1

Multiple items are selected or deselected by clicking them with the mouse or pressing the SPACEBAR.

Extended

2

Multiple items are selected by holding down SHIFT and clicking them with the mouse or by holding down SHIFT and pressing an arrow key to extend the selection from the previously selected item to the current item. You can also select items by dragging with the mouse. Holding down CTRL and clicking an item selects or deselects that item.

Note:You can set the MultiSelect property by using the list box's property sheet, a macro, or Visual Basic for Applications (VBA) code.

This property can be set only in form Design view.

You can use the ListIndex property to return the index number for the selected item. When the MultiSelect property is set to Extended or Simple, you can use the list box's Selected property or ItemsSelected collection to determine the items that are selected. In addition, when the MultiSelect property is set to Extended or Simple, the value of the list box control will always be Null.

If the MultiSelect property is set to Extended, requerying the list box clears any selections made by the user.

Example

To return the value of the MultiSelect property for a list box named "Country" on the "Order Entry" form, you can use the following:

Dim b As Byte
b = Forms("Order Entry").Controls("Country").MultiSelect

To set the MultiSelect property, you can use the following:

Forms("Order Entry").Controls("Country").MultiSelect = 2 ' Extended.

Need more help?

Want more options?

Discover Community

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

MultiSelect Property - Microsoft Support (2024)
Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6102

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.