Drop Down Menu in Form from Existing Table--Multiple Selections

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,
I learned how to use a unbounded list box in a form to creat a dropdown list
of items to send the results to a query [forms]![formname]![listname].
Currently this allows me to only select one item from the list to send to
the query. How can I make multiple selections at the same time....either
contiguous or non contiguous? Is there some property of the list box that I
need to turn off or on to allow multuple selections?

THanks.
 
Hi,

Try setting the Multi Select Property to Simple or Extended.

To know which items have been selected in code use the List Boxes
ItemsSelected property to return a collection of variants. Then with a
particular variant get the item value by using the Column property:

Dim varItm As Variant
Dim ctl as Control
Set ctl = Me!Names
For Each varItm In ctl.ItemsSelected
Debug.Print ctl.Column(0,varItm)
Next varItm

--
HTH

Mark Phillipson

Free Add-Ins at; http://mphillipson.users.btopenworld.com/
 
Back
Top