S
Steve Marshall
Hello all,
I need to set up a query where part of the WHERE clause is an IN(list)
construct. The list will consist of one or more values (up to 3 or 4)
selected by the user. I therefore would like the "list" part to be a
parameter to the query, so I can plug in the set of values before I run
the query. But I can't get it to work.
In the query I have the criterion for the field as In([ItemList]).
ItemList is set up as a query parameter of type Text. The field is a
text field. The value I am putting into ItemList in my code is a
string with the field values separated by commas. I have tried them
without any quotes, with single quotes (around each individual value),
and with double quotes (ditto). But nothing works - it never gets a
match. I don't get any complaint about the syntax in any of these
cases.
Can this be done? It seems to me like it should be quite
straightforward. But I seem to recall trying to do this once before and
never cracking it. Any assistance most welcome.
I need to set up a query where part of the WHERE clause is an IN(list)
construct. The list will consist of one or more values (up to 3 or 4)
selected by the user. I therefore would like the "list" part to be a
parameter to the query, so I can plug in the set of values before I run
the query. But I can't get it to work.
In the query I have the criterion for the field as In([ItemList]).
ItemList is set up as a query parameter of type Text. The field is a
text field. The value I am putting into ItemList in my code is a
string with the field values separated by commas. I have tried them
without any quotes, with single quotes (around each individual value),
and with double quotes (ditto). But nothing works - it never gets a
match. I don't get any complaint about the syntax in any of these
cases.
Can this be done? It seems to me like it should be quite
straightforward. But I seem to recall trying to do this once before and
never cracking it. Any assistance most welcome.