is null in iif of a criteria?

  • Thread starter Thread starter martin
  • Start date Start date
M

martin

I've been trying 'IIf([forms]![ztest]![insfrom]=" ","is
Null","")' in the criteria of a query. This doesn't work.
just 'is null' works and putting in a constants in the iif
works. Any thoughts?
 
Sure -- replace the "is Null" with just Null (no quotes).

As In:
IIf([forms]![ztest]![insfrom]=" ",Null,"")

Although I'm not certain why you would want to test for
three spaces...

David Atkins, MCP
 
-----Original Message-----
I've been trying 'IIf([forms]![ztest]![insfrom]=" ","is
Null","")' in the criteria of a query. This doesn't work.
just 'is null' works and putting in a constants in the iif
works. Any thoughts?
.

what I usually do is

IIF(IsNull([Forms]![ztest]![insfrom]),"is null","")

you have to use the the ISNull() function within the IIF
statement.

:)

Sasha
 
Back
Top