View Single Post
  #1 (permalink)  
Old December 7th, 2005, 06:48 PM
Enoch Enoch is offline
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question with iif

I'm pretty new to access, and I'm using an iif statement in the criterea section of a query, if Category1 = 1 it means uknown and I'd like to return all ID's,
the following is the if statement I tried

iif([Forms]![frmOutflow]![fsubOutItem]![cboCategory1Select]=1,
>0,
[Forms]![frmOutflow]![fsubOutItem]![cboCategory1Select])

it gives me no errors but the query returns an empty set if Category1 = 1

Now if I put a number like this:

iif([Forms]![frmOutflow]![fsubOutItem]![cboCategory1Select]=1,
4,
[Forms]![frmOutflow]![fsubOutItem]![cboCategory1Select])

It returns all where ID = 4 as expected

And if I try
iif(1,>0,[Forms]![frmOutflow]![fsubOutItem]![cboCategory1Select])
I still get an empty set

Can anyone help me?
Thanks


Enoch
__________________
Enoch
Reply With Quote