Multiple select list box values

S

Sandra Daigle

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
 
K

Kanad

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?

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top