K
kaosyeti via AccessMonster.com
i have a table that i'm pulling records from where i want to limit my results
by multiple criteria. i'm stuck on a particular field ([Ordered Options])
that has a list of option codes, all 3 characters long, separated by commas:
B37, C60, FE9, J41, L61, MN5, US8, 19G, 41U
what i want to do is to write an WHERE that will test to see if specific user-
selected option codes are within the field, and then pull those records. so
i have now a string variable strWhere that pulls an where clause that looks
like this:
([Model] = "ZV14526") and ([msrp] <= 30000)
and i want one that adds something like:
instr(1, [Ordered Options], <<user selected option code>>) > 0
so that if the option code is not in the field, the instr expression returns
0 and won't be in the where clause.
is what i'm describing possible, is there another (ie better) way to do it,
or did i not explain it well enough and you need more info? thanks for
looking.
greg
by multiple criteria. i'm stuck on a particular field ([Ordered Options])
that has a list of option codes, all 3 characters long, separated by commas:
B37, C60, FE9, J41, L61, MN5, US8, 19G, 41U
what i want to do is to write an WHERE that will test to see if specific user-
selected option codes are within the field, and then pull those records. so
i have now a string variable strWhere that pulls an where clause that looks
like this:
([Model] = "ZV14526") and ([msrp] <= 30000)
and i want one that adds something like:
instr(1, [Ordered Options], <<user selected option code>>) > 0
so that if the option code is not in the field, the instr expression returns
0 and won't be in the where clause.
is what i'm describing possible, is there another (ie better) way to do it,
or did i not explain it well enough and you need more info? thanks for
looking.
greg