Pass Multiple List Box Values into a Query

sross81

Registered User.
Local time
Today, 01:29
Joined
Oct 22, 2008
Messages
97
Hello,

I have a list box with 5 separate facilities. I want to give the user the option to select just 1 or multiple facilities. The list box is on a form. There is a button on the form that opens a report that is tied to a query that takes the value from the list box.

[Forms]![frm_CMNReports_SecondEyes]![lstFacilities]

If I keep the list box properties set to multi select none the value gets passed to the query no problem. If I switch the multi select property to Simple or Extended the report will just open with no data like it couldn't get any value passed to it.

Does anyone have any suggestions?

Thank you
 
List boxes, when set to multi-select, have no value - they are always NULL. You would need to get the values through a function and change the query using a QueryDef object. If you can use this query in a Report instead, you can open that report using this method here
http://www.baldyweb.com/multiselect.htm
using a multi-select listbox.
 
Thank you for the link. I just now got back in to look at it. I will test it out and see if I have any other questions that come up.
 

Users who are viewing this thread

Back
Top Bottom