IIF statement with Criteria

shrikant

New member
Local time
Today, 03:48
Joined
Apr 21, 2013
Messages
7
HI All,

I am working on one access database wherein in query i need to use iif statement, i have one field called Age, in field criteria i need to use,

IIF(weekday(DATE())="2",>"3",>"1")

this if staement is not working i believe that we cant use ">" ... this type of criteria with iif, so what should i do?

my intention is if today is Monday than age filed >3 else it should be >1
,

please help me out on this!! thanks :)
 
Hi and welcome to the forum.

I think your criteria should be something like:

IIF(weekday(DATE())="2",>"3",>"1")

(weekday(DATE())="2" AND [AGE]>"3") OR (weekday(DATE())<>"2" AND [AGE]>"1")
 
Hi Stopher,

Thanks for providing me the solution!
it has been worked properly... problem solved.:)
 

Users who are viewing this thread

Back
Top Bottom