Why am I getting the #Name error?

J

JWCrosby

This is probably embarrassingly simple, but I'm obviously missing something.

I have a field named EI_Exempt that is a yes/no field. On a form in the
detail section if I set a control source to EI_Exempt it will properly show
either a -1 or zero.

However, if I change it to a conditional statement (below) the control shows
"#Name" Here's the simple statement I'm using: (I have SUPER simplified my
intended formula just to troubleshoot and get by the #Name error. Once I get
past that I will input the proper If...then statement.)

=Iff([EI_Exempt]=-1,"Y","No")

Why is this throwing a #Name error?

Thanks in advance.

Jerry
 
G

ghetto_banjo

and you can also just use Yes and No like

iif([El_Exempt] = Yes, "Y", "No")
 
J

JWCrosby

Thanks, Bruce! You probably should have written, "It's IIf, not Iff,
STUPID!" and I would have deserved it! Ha!

Jerry

BruceM said:
It's IIf, not Iff.

JWCrosby said:
This is probably embarrassingly simple, but I'm obviously missing
something.

I have a field named EI_Exempt that is a yes/no field. On a form in the
detail section if I set a control source to EI_Exempt it will properly
show
either a -1 or zero.

However, if I change it to a conditional statement (below) the control
shows
"#Name" Here's the simple statement I'm using: (I have SUPER simplified
my
intended formula just to troubleshoot and get by the #Name error. Once I
get
past that I will input the proper If...then statement.)

=Iff([EI_Exempt]=-1,"Y","No")

Why is this throwing a #Name error?

Thanks in advance.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top