T
Todd McDermid
I'm wondering if this is possible...
I have a dynamic, short "list" of values that I would like to use as a
criteria in a standard Access Query. These values only apply to one column,
and I want to filter records that match any one of them. Coming from a T-SQL
background, the "In" criteria seems like the best place to start.
However, when I place "In (GetValues())" as the criteria for a column in the
query, it only works if the function "GetValues" returns a String, and that
string consists of ONE value to filter by:
* GetValues() -> "X" filters records with "X" in the column
* GetValues() -> "'X', 'Y'" does not find records that have either "X" or
"Y" in the column
* The query refuses to execute if GetValues is defined to return a Variant
(array)
* The query refuses to execute if the criteria is defined as "In GetValues()"
Does anyone know if the above type of thing is possible using "In" or
another construct in Access' query "language"?
TYVM
I have a dynamic, short "list" of values that I would like to use as a
criteria in a standard Access Query. These values only apply to one column,
and I want to filter records that match any one of them. Coming from a T-SQL
background, the "In" criteria seems like the best place to start.
However, when I place "In (GetValues())" as the criteria for a column in the
query, it only works if the function "GetValues" returns a String, and that
string consists of ONE value to filter by:
* GetValues() -> "X" filters records with "X" in the column
* GetValues() -> "'X', 'Y'" does not find records that have either "X" or
"Y" in the column
* The query refuses to execute if GetValues is defined to return a Variant
(array)
* The query refuses to execute if the criteria is defined as "In GetValues()"
Does anyone know if the above type of thing is possible using "In" or
another construct in Access' query "language"?
TYVM