i have a form with a multiselect list. i want my query to return records
based on the multiple selections. how can i achieve that?
i have tried [forms]![formname]![listname] but i get no data.
You cannot directly use a multi-select list box like that in a query.
You will need to loop through the ItemsSelected collection of the listbox.
It is possible to write a function that accepts the field value and the list
box and returns True/False as to whether it was found, and use this function
in the WHERE clause of a query.
However, it's probably easier to build a Filter for your form or report from
the ItemsSelected. Here's an example of how to do that:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>i have a form with a multiselect list. i want my query to return records
> based on the multiple selections. how can i achieve that?
>
> i have tried [forms]![formname]![listname] but i get no data.