Converting an Excel IF statement to an Access IFF statement

P

parksjp1

I need to convert the following excel IF statement to an Access IFF statement
IF(Q2="Y",IF( J2="N",1,0),0) and it returns results of 0 or 1.

where Q2 = where Q2 is the column named fcsdel and J2 is the column named
fcsadt

The statement I have currently does not produce the correct results as it
only returns 1, it is below.
Expr3: IIf([fcsdel]="Y",1,(IIf([fcsadt]="N",1,0)))

Any ideas?
 
G

George Nicholson

per OP, OR should be AND, I think.

--
George Nicholson

Remove 'Junk' from return address.
Al Camp said:
Try
IIf([fcsdel] = "Y" OR [fcsadt] = "N",1,0)
assuming that both fields are text. Didn't have time to test, but it
should fly.

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

parksjp1 said:
I need to convert the following excel IF statement to an Access IFF
statement
IF(Q2="Y",IF( J2="N",1,0),0) and it returns results of 0 or 1.

where Q2 = where Q2 is the column named fcsdel and J2 is the column named
fcsadt

The statement I have currently does not produce the correct results as it
only returns 1, it is below.
Expr3: IIf([fcsdel]="Y",1,(IIf([fcsadt]="N",1,0)))

Any ideas?
 
Top