Thanks , I will give this a try.
--
Jacqueline
:
At first glance, it seems that if the student enter
Vet102,Vet103
(no space, just a coma between the names), as answer to the prompt for
[delimitedListParam] (or other mechanic you really use), that should
do
the job with:
WHERE ( "," & [delimitedListParam] & ", " ) LIKE ("*," &
someColumn &
",*")
(note the addition of coma)
To allow the student to use space in the input,
Vet102, Vet103
you can try using:
WHERE ( "," & [delimitedListParam] & ", " ) LIKE ("*[, ]" &
someColumn & "[, ]*")
Vanderghast, Access MVP
Hi Michel,
You posted this a while back, can I pick your brains a little here
please.
I would like to create an option where a student can click a button
and
run
multipal check off sheets based on the classes they enter. The form
would
be
run from a parameter query that pulls the tasks associated with the
courses
they enter.
Example the student would input VET102, VET103 etc. I have found that
parameter queries will allow you two input options but I am sure more
than
that will be needed. Is this possible am I going about it the hard
way (I
have propensity for the hard way)

Any help would be greatly appreciated.
Thanks
--
Jacqueline
:
You loop over the Selected items, concatenate the values to be
compared
(not
necessary the values displayed) as a delimited list and use that
list as
'argument'. You can also use the operator LIKE instead of InStr so
your
query can be used outside Access (such as from Excel):
WHERE ( "," & [delimitedListParam] & ", " ) LIKE ("*" &
someColumn
&
"*")
which assumes your delimited list of value has no unwanted spaces,
ie,
like
"1,2,3,4" and not "1, 2, 3, 4" having a space after each coma.
Vanderghast, Access MVP
I'm working on this in Access 2007 and i know these posts happened
a
while
ago - but how would the parameter be set up from the multi-select
list?
I'm not finding the results that i'm looking for.
Thanks for the help
AJ
:
Dear Norm:
It is possible to do this using a parameter, although it isn't
the
best technique.
If the user enters a list like JSB,JSC,JGS (without quotes in
this
example, separated by commas and no spaces, then you can search
that
string with the InStr function using the values in the subject
column.
This can work as long as there are no commas within the subject
column's values.
To do this, append a comma before and after the parameter list
and
before and after the value from the column:
WHERE InStr("," & [Enter List: ] & ",", "," & [SomeColumn] & ",")
0
This places a burden on the user to use commas (without spaces)
exactly, and to spell each item exactly. I have found this is
often
too much to ask. Instead, a multi-select list box on a form is
much
easier for the users, although it is a bit of work for you to
implement.
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
On Wed, 27 Oct 2004 10:29:10 -0700, "Norm Lundquist"
Is it possible to have parameter query that uses multiple
values?
Example: a large database contains a field named "ClassCode".
The
user
wants to specify any number of values for this field (like
"JSB",
"JSC",
"JGS") or retrieve all records.
The only parameter query that I get to work only returns 1
value. Is
it
possible to retrieve multiple values? If so, what is the
syntax?
Thank You!