is null in iif of a criteria?

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?
 
G

GreySky

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
 
S

Sasha

-----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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top