Hi all,
I'm trying to work out a query in design view, I'm using the IIF statement and was wodering if there's a way to use an else type function?
This is what I have working:
IIF([field1]=Y And [field2] Between 1 And 5,"Level1,"Decline")
This is where I'm trying to get to:
IIF([field1]=Y And [field2] Between 1 And 5,"Level1","Decline" Else [field2] Between 6 And 10,"Level2" Else [field2] Between 11 And 15, "Level3")
I've tried various options but none work, and just in case the above doesn't make sense this is what I'm trying to do.
field1 has to be Y otherwise it's a straight decline and no offers given
If field1 has Y then the query will test the value in field2 and depending on the value, will display the correct info (for this example Level1/2/3 etc)
I don't know SQL so is it possible to achieve this in the normal design view using the IIF statement?
Thanks in advance
I'm trying to work out a query in design view, I'm using the IIF statement and was wodering if there's a way to use an else type function?
This is what I have working:
IIF([field1]=Y And [field2] Between 1 And 5,"Level1,"Decline")
This is where I'm trying to get to:
IIF([field1]=Y And [field2] Between 1 And 5,"Level1","Decline" Else [field2] Between 6 And 10,"Level2" Else [field2] Between 11 And 15, "Level3")
I've tried various options but none work, and just in case the above doesn't make sense this is what I'm trying to do.
field1 has to be Y otherwise it's a straight decline and no offers given
If field1 has Y then the query will test the value in field2 and depending on the value, will display the correct info (for this example Level1/2/3 etc)
I don't know SQL so is it possible to achieve this in the normal design view using the IIF statement?
Thanks in advance