Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Listbox Selections (multiselect)

Status
Not open for further replies.

Smoores

Programmer
Jun 5, 2002
9
CA
I have a multiselect list box made. The user is to select as many of the listbox options (they are only order numbers) as necessary. The ones selected refer to the records that get printed; the ones unselected are ignored. Can anyone help me with the code that would identify which numbers (options) are selected.

Thanks for any help!
Smoores
 
Hi Smoores!

You can loop through the selections like this:

Dim varRow As Variant

For Each varRow In Me!YourListBox.ItemsSelected
Do your stuff here you can access any column in the list
box using Me!YourListBox.Column(0, varRow). 0 gets you
the first column 1 the second etc.
Next varRow

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top