Got it. I was actually looking for
Select
IIf(IsNull([tblTest].[Address])=True,0,4) +
IIf(IsNull([tblTest].[Name])=True,0,7)
from tblTest
Now I got it working. Thanks.
Trevor Best - 31 May 2005 08:11 GMT
> Got it. I was actually looking for
>
[quoted text clipped - 4 lines]
>
> Now I got it working. Thanks.
When using IIf, Isnull returns a boolean result so you wouldn't need the
"=True" bit in there, so:
IIf(IsNull([tblTest].[Address]),0,4)
will work and shave a few nanoseconds off each row.

Signature
[OO=00=OO]
Justin Hoffman - 31 May 2005 11:37 GMT
> Got it. I was actually looking for
>
[quoted text clipped - 4 lines]
>
> Now I got it working. Thanks.
Depending on how you have your fields set up, you may have strings of
zero-length or containing only spaces, so you could have:
IIF(Len(Trim(Nz(MyField)))=0,0,4)