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!

Criteria for query from selections out of mutiple listbox 1

Status
Not open for further replies.

DriesG

Programmer
Jul 2, 2003
16
0
0
BE
Hello,

I have a query that I want to filter with a criteria in a certain column. When I tell the qeury to get the criteria from a listbox in a form, that's no problem, as long as the listbox is not set to multiselect.
If I change the listbox to multiselect, the output of the box is always 0. I know that's normal. The query won't work.
You can retrieve the information of the bound column from the listbox with the function itemsselected.
If you select an item in the listbox, this function gives you then the value of the bound column from the item you have selected. With this information, the query works.
Only, if I make multiple selections, I only receive the information of the highest value from all the items I have selected in the listbox.

Is there any way you can tell a query that it has the filter the items you have selected in a multiple listbox?
For example: criteria = listboxitem1 or listboxitem2 or ...

Many thanks for any suggestion.

Best regards,
Dries
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top