using multi-select on a listbox to set query criteria criteria

  • Thread starter Thread starter kom73
  • Start date Start date
K

kom73

Guest
can anyone help with this one?

I have created a simple search form using several comboboxes to set my query criteria. But the user must select a value for each box for the query to run - this make a very specific search. My problem is that I would like the user to be able to select all or several options in the combobox to run a more general search.

I have tried doing this using listboxes instead of comboboxes with the miltiselect function set to simple - but it will not run when more than one item is selected in the listbox.

I presume there is something wrong with my query criteria but I dont what - can any body help?!
 
If you are building your query using VBA, you are able to loop through the items in a listbox and check the Selected property. ie

for i = 0 to Me!Listbox.Listcount -1
if Me!Listbox.Selected(i) then
...
end if
next i

If you aren't using VBA, unfortunately I don't know of any way to achieve it.

I hope it helps.
SteveA
 

Users who are viewing this thread

Back
Top Bottom