Listbox not working like expected

P

Pete

Can i use a multi-selection listbox to set the criteria in
a query similar to using a combobox. I use the following
in the criteria section of the query, =[forms]![form1]!
[list2]
When i have one item selected, it filters the query
properly. When i try to choose select multiple items to
filter by, it returns no results. any suggestions?
 
P

Pete

That is very helpful. thankyou. where would i type this
code? within the listbox?
-----Original Message-----
Hi,
No, you can't do it that way.
Have a look here and see if this helps out:
http://www.mvps.org/access/forms/frm0007.htm

--
HTH
Dan Artuso, Access MVP


"Pete" <[email protected]> wrote in
message news:[email protected]...
Can i use a multi-selection listbox to set the criteria in
a query similar to using a combobox. I use the following
in the criteria section of the query, =[forms]![form1]!
[list2]
When i have one item selected, it filters the query
properly. When i try to choose select multiple items to
filter by, it returns no results. any suggestions?


.
 
D

Dan Artuso

Depends, what is the query for? What are you filtering?
When is the query run?
Need more detail.

--
HTH
Dan Artuso, Access MVP


Pete said:
That is very helpful. thankyou. where would i type this
code? within the listbox?
-----Original Message-----
Hi,
No, you can't do it that way.
Have a look here and see if this helps out:
http://www.mvps.org/access/forms/frm0007.htm

--
HTH
Dan Artuso, Access MVP


"Pete" <[email protected]> wrote in
message news:[email protected]...
Can i use a multi-selection listbox to set the criteria in
a query similar to using a combobox. I use the following
in the criteria section of the query, =[forms]![form1]!
[list2]
When i have one item selected, it filters the query
properly. When i try to choose select multiple items to
filter by, it returns no results. any suggestions?


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top