• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

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?

0
andyb7901
Asked:
andyb7901
1 Solution
 
MootherCommented:
use the NZ() function instead of IsNull in queries

it works better for me...
0
 
Rey Obrero (Capricorn1)Commented:
try this

dox_fsa: IIf([7] is null and [19] is null,False,IIf([7]>0 Or [F19]>0,True,False))
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now