Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Sep 2007
    Location
    Bayamon, Puerto Rico, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple Selection in List Box (2000)

    How can I select multiple values in a List Box?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple Selection in List Box (2000)

    Welcome to Woody's Lounge!

    Set the Multi Select property of the list box (in the Other tab of the Properties window) to Simple or Extended.
    Simple means that clicking an item will select it, or unselect it if it had already been selected.
    Extended means that you can select items the same way you can select files in Windows Explorer:
    - Click to select an item.
    - Shift+Click on another item to select all items from the originally selected one to the one you click.
    - Ctrl+Click to select or unselect individual items.

    You need to use VBA code to do something with the selection. The list box has a property SelectedItems:

    Dim itm As Variant
    For Each itm In MyListBox.SelectedItems
    ...
    Next itm

  3. #3
    2 Star Lounger
    Join Date
    Oct 2006
    Location
    Melbourne, Victoria, Australia
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Selection in List Box (2000)

    Hi Hans,
    Quick question: why can't I see the SelectedItems property in the list of properites for my list box? How can I see all available properties?
    Thanks, Van

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple Selection in List Box (2000)

    SelectedItems is only available in VBA code, not in the Access interface. To see all available properties, methods and events, type the word listbox in the Visual Basic Editor (for example in the Immediate window) and press F1.

  5. #5
    New Lounger
    Join Date
    Sep 2007
    Location
    Bayamon, Puerto Rico, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Selection in List Box (2000)

    Ok, I convert the images to gif wih a tool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •