iif function (1 Viewer)

yanliang

New member
Local time
Today, 00:14
Joined
Sep 10, 2020
Messages
7
I need to create a query for certified employees.
the certified field is called "certified?" and is Yes/No
If an employee is certified I need to input "Eligible for Bonus" if not "Enroll in Summer MG Class"

I inserted in a function
iif([Certified?]="Yes","Eligible for Bonus", iif([Certified?]="No", "Enroll in Summer MG Class"))
but when I run the field it keep showing up #error.
I don't know why.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:14
Joined
May 7, 2009
Messages
19,246
only test for 1 condition.
Yes/No field can either be True or False (Yes or No).

iif([Certified?], "Eligible for Bonus", "Enroll in Summer MG Class") As Remarks
 

yanliang

New member
Local time
Today, 00:14
Joined
Sep 10, 2020
Messages
7
thankyou so much
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:14
Joined
May 7, 2009
Messages
19,246
you're welcome!
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:14
Joined
Feb 19, 2002
Messages
43,445
Although arne's suggestion is correct that you only need to check for one value, the actual problem is that you were using "Yes" instead of True or -1 for a Yes/No field
 

Users who are viewing this thread

Top Bottom