Problem with IIF condition

Unicon

Registered User.
Local time
Tomorrow, 02:43
Joined
Dec 24, 2009
Messages
123
Dear all,

Please see the attachment. I want to get a NormalDays from ANormalDays. I want to make 26 days in NormalDays If ANormalDays is 26 or 27.
I put a condition like that but showing that Query is too complex. :confused:

Please advice.
 

Attachments

  • untitled.JPG
    untitled.JPG
    48.3 KB · Views: 99
That expression asks if the value is 27 only if the value is 26 in the previous part of the test. Obviously this is not going to do anything useful.

IIF(ANormalDays=26 OR ANormalDays=27, 26, ANormalDays)

If the ANormalDays cannot exceed 27 then just use use:
IIF(ANormalDays>=26, 26, ANormalDays)
 

Users who are viewing this thread

Back
Top Bottom