Multible selection in list boxes

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

Guest

Hi there...

I am using a list box to display values for the user to select and the selection is supposed to be a filter in a SQL query for another list box. My problem is that I need to allow the user to select multible rows in the list box to build the query. Any one out there that has the faintest idea how to read the users selection within VBA?
I have tried to read the value and selection properties with no luck.

Please help me!!!
 
See The Access Web:

http://www.mvps.org/access/forms/frm0007.htm

--
HTH
Van T. Dinh
MVP (Access)


Logi Huldar said:
Hi there...

I am using a list box to display values for the user to select and the
selection is supposed to be a filter in a SQL query for another list box. My
problem is that I need to allow the user to select multible rows in the list
box to build the query. Any one out there that has the faintest idea how to
read the users selection within VBA?
 
In addition to the lead Van provided, another approach, particularly if
there is a possibility of a LARGE number of (multi-)selections, would be to
place the selections in a temp table. You'd then create your query to join
the selections listed in the temp table to the rest of what you were doing.

You'd also probably want to delete all rows out of that temp table, as part
of your routine -- both before and after, just to be sure?!
 
Back
Top