Iff Question (Should be simple but I can't see to get it right!!)

C

Chas

Okay what i am trying to do is to get the form to show something like this:
The "Spouse:" part should only show up if there is something in the
[Significantother] field..

So the desired result is

Spouse: Significantother

I thought this would do it which does show the name of the significantother
but doesn't include the Spouse:
=IIf([SIGNIFICANTOTHER]=Not Null,"Spouse:",[Significantother])

What am I missing?
 
K

KARL DEWEY

I think you have it backwards --
=IIf([SIGNIFICANTOTHER] Is Null,"Spouse:",[Significantother])
 
F

fredg

Okay what i am trying to do is to get the form to show something like this:
The "Spouse:" part should only show up if there is something in the
[Significantother] field..

So the desired result is

Spouse: Significantother

I thought this would do it which does show the name of the significantother
but doesn't include the Spouse:
=IIf([SIGNIFICANTOTHER]=Not Null,"Spouse:",[Significantother])

What am I missing?


This part is incorrect. (=Not Null)
A field can be Not Null but it cannot be = Not Null.

You can use either:
=IIf(IsNull([SIGNIFICANTOTHER]),"Spouse:",[Significantother])

Or...
=IIf([SIGNIFICANTOTHER] Is Null,"Spouse:",[Significantother])

If you wish to reverse the Is Null logic you would use either
= IIf(Not IsNull([FieldName]), etc...)
or
= IIf([FieldName] Is Not Null, etc...)
 
B

bhicks11 via AccessMonster.com

Maybe you want:

=IIf(not isnull([SIGNIFICANTOTHER]),"Spouse: " & [Significantother],)

Bonnie
http://www.dataplus-svc.com/document_scanning/document_scanning.htm
Okay what i am trying to do is to get the form to show something like this:
The "Spouse:" part should only show up if there is something in the
[Significantother] field..

So the desired result is

Spouse: Significantother

I thought this would do it which does show the name of the significantother
but doesn't include the Spouse:
=IIf([SIGNIFICANTOTHER]=Not Null,"Spouse:",[Significantother])

What am I missing?
 

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