Multiple select list box values

  • Thread starter Thread starter Kanad
  • Start date Start date
You loop through the ItemsSelected property of the listbox as shown in this
example:

Sub BoundData()
Dim varItem As Variant
with me.lstMyList
For Each varItem In .ItemsSelected
Debug.Print .ItemData(varItm)
Next varItm
end with
End Sub

For an example of how you might use this to build criteria for a query see:
http://www.mvps.org/access/forms/frm0007.htm
 
Thank you very very much. Just the thing I needed

-----Original Message-----
You loop through the ItemsSelected property of the listbox as shown in this
example:

Sub BoundData()
Dim varItem As Variant
with me.lstMyList
For Each varItem In .ItemsSelected
Debug.Print .ItemData(varItm)
Next varItm
end with
End Sub

For an example of how you might use this to build criteria for a query see:
http://www.mvps.org/access/forms/frm0007.htm

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

How do I retrieve values from a multiple selction list
box in a form?

.
 
Back
Top