I am running a report that uses a query as its record source and opens a
form collecting beginning and ending item numbers to feed to the query. This
works, but now I'm trying to use the result of a multi-select list box on
the form to feed multiple item numbers to the query.
In other words - if you pick item #100,105,110 from the list box, the query
should display information for those 3 items.
If I type 'IN (100,105,110)' in the criteria cell of the 'itemNo' field in
my query, it works - I get information for those 3 items. However, I would
like the list of items to be variable, coming from the items selected in the
multi-select list box on my form.
How do I loop through the items in the list box and feed them to the query?
What should I put in the criteria cell for my query?
Thanks very much,
Emma
form collecting beginning and ending item numbers to feed to the query. This
works, but now I'm trying to use the result of a multi-select list box on
the form to feed multiple item numbers to the query.
In other words - if you pick item #100,105,110 from the list box, the query
should display information for those 3 items.
If I type 'IN (100,105,110)' in the criteria cell of the 'itemNo' field in
my query, it works - I get information for those 3 items. However, I would
like the list of items to be variable, coming from the items selected in the
multi-select list box on my form.
How do I loop through the items in the list box and feed them to the query?
What should I put in the criteria cell for my query?
Thanks very much,
Emma
Comment