Pass Multiple List Box Values into a Query (1 Viewer)

sross81

Registered User.
Local time
Yesterday, 17:50
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
 

boblarson

Smeghead
Local time
Yesterday, 17:50
Joined
Jan 12, 2001
Messages
32,059
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.
 

sross81

Registered User.
Local time
Yesterday, 17:50
Joined
Oct 22, 2008
Messages
97
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.
 

sross81

Registered User.
Local time
Yesterday, 17:50
Joined
Oct 22, 2008
Messages
97
That linked worked perfectly. Thank you!
 

Users who are viewing this thread

Top Bottom