I am trying to select specific records based on input in a query. This criteria currently works to select everything with an ID less than 21 or 31 based on the users entry:
<IIf([Enter "Y" for List 1]="Y",21,31)
I now need to change the query so that only certain records are selected based on the users entry. As an example, I would like to select 1, 3, 5 and 7 if they enter “Y”. And I would like to select 2, 4, 6 and 8 if they don’t enter a “Y”.
Here is what I have tried:
In IIf([Enter "Y" for List 1]="Y",(3,5,7,9),(2,4,6,8))
With this criteria, I get this error – “The In operator you entered requires parentheses”. I have tried many other variations with no luck. Anyone have an idea of how I can do this?
<IIf([Enter "Y" for List 1]="Y",21,31)
I now need to change the query so that only certain records are selected based on the users entry. As an example, I would like to select 1, 3, 5 and 7 if they enter “Y”. And I would like to select 2, 4, 6 and 8 if they don’t enter a “Y”.
Here is what I have tried:
In IIf([Enter "Y" for List 1]="Y",(3,5,7,9),(2,4,6,8))
With this criteria, I get this error – “The In operator you entered requires parentheses”. I have tried many other variations with no luck. Anyone have an idea of how I can do this?