IIF statement in MS Access Queries don't return "false argument"

R

rock

Dear All,

I am working on a MS Access Select query where I am using an IIF()
function

IIf([dbo_loc]![POSTALCODE]=[TRHazardZones]![POSTALCODE],[TRHazardZones]![TRZONES],'LOW')

Output: If condition is TRUE then it works, but when condition is
false it will return nothing.

I have also tried

IIf([dbo_loc]![POSTALCODE]=[TRHazardZones]![POSTALCODE],[TRHazardZones]![TRZONES],"LOW")

Regsrds,
Shital
 
S

strive4peace

Hi Shital,

try using nz (convert null values to zero or empty string or
whatever is specified in optional 2nd argument)

IIf(
nz([dbo_loc]![POSTALCODE],"")=
nz([TRHazardZones]![POSTALCODE],"")
....

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 

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