Link to home
Start Free TrialLog in
Avatar of andyb7901
andyb7901

asked on

IIf Statments in queries

Hey,

Can someone help me with the formatting of a line of my query. I am trying to say;
if column[7] is null then check column [19], if they are both null return FALSE.
if column[7] is not null check its value is greater than 0, if it is not greater than 0, check column [19] value is greater than 0, if it is also not greater than 0 return FALSE, but if either column [7] or [19] return a value greater than 0 return TRUE.

I have tried to do this in a query, and I need to keep it in this format.

dox_fsa: IIf(IsNull([7]),IIf(IsNull[19],False,IIf([7]>0,True,IIF[19]>0,True,False))

Something like that?

Avatar of Moother
Moother

use the NZ() function instead of IsNull in queries

it works better for me...
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dox_fsa: IIf(IsNull([7]),IIf(IsNull[19],False, IIf([19]>0,True,False)),IIf([7]>0,True,IIf(isNull([19]),False,IIf([19]>0,True,False)))

  Think I got enough parends on the end.

JimD