D
Dave Twombly
I'm trying to make a multiselect listbox provide one or more parameters
for a query. I've found useful code for concatenating the items
selected in the list box at
http://www.mvps.org/access/forms/frm0007.htm, but I don't know how to
make my query read that string as its parameter. The website says this:
"Note: You can still use a parameterized query provided you pass the
entire Where clause to it via code as a parameter. (eg. Have the query
reference a hidden control to which you manually assign the complete
WHERE clause using the following logic...[Code begins])"
What I don't know how to do here is assign the WHERE clause that the
code produces to a control on my form. I assume that once that's done I
simply refer the query condition to the control, much as if it were a
single-select listbox.
Would someone please help me complete these final steps of getting the
query to accept the string as one of its parameters?
(Incidentally, I found a helpful way to do this for reports on
http://allenbrowne.com/ser-50.html, but I can't make that method work
for a query.)
Thanks,
Dave
for a query. I've found useful code for concatenating the items
selected in the list box at
http://www.mvps.org/access/forms/frm0007.htm, but I don't know how to
make my query read that string as its parameter. The website says this:
"Note: You can still use a parameterized query provided you pass the
entire Where clause to it via code as a parameter. (eg. Have the query
reference a hidden control to which you manually assign the complete
WHERE clause using the following logic...[Code begins])"
What I don't know how to do here is assign the WHERE clause that the
code produces to a control on my form. I assume that once that's done I
simply refer the query condition to the control, much as if it were a
single-select listbox.
Would someone please help me complete these final steps of getting the
query to accept the string as one of its parameters?
(Incidentally, I found a helpful way to do this for reports on
http://allenbrowne.com/ser-50.html, but I can't make that method work
for a query.)
Thanks,
Dave