"Pieter Linden" <pietlinden@hotmail.com> wrote in message
news:bf31e41b.0312051024.3e87b97@posting.google.co m...[color=blue]
> arejay <arejay001@yahoo.com> wrote in message[/color]
news:<grpvsvo1d1ptn3tac0gh7q4i2cu6m64fo6@4ax.com>. ..[color=blue][color=green]
> > I have a listbox with 13 columns in it, the bound column being column
> > 1. I want to query a table with the list of values in the bound column
> > being used as the criteria. It doesn't matter to me if anything is
> > selected, I just want the entire list of values from the bound column.
> >
> > I know I could do this looping through the listbox, but I'd rather
> > avoid that.
> >[/color]
> Yeah, I'd like to make lots of money, but I'd rather not work. Umm...
> Wake up, you're dreaming. That's the ONLY way to get all the values
> from a listbox, well, if your MultiSelect property is set to True.[/color]
It's always a bad idea to say ONLY or ALWAYS (a little recursive
disclaimer..)
If the listbox has a query for a rowsource, you can get the values from the
query. Maybe you misread - he doesn't say they have to be selected, just in
the list.
[color=blue]
> There's code at
www.mvps.org/access that will loop through the
> listbox... and you'll have to build the SQL on the fly. Maybe create
> a function to concatenate the items in the Selected collection of the
> listbox and then use that.[/color]