Using existing fields in an IIf statement

  • Thread starter Thread starter Keith Woollacott
  • Start date Start date
K

Keith Woollacott

I am trying to create a text field which displays an existing field is
another field is null. The expression I have used is:
=IIf([Home_Address]="",[Manager],Null). Unfortunately this doesn't work in
that nothing is ever displayed, even if there is nothing in the
[Home_Address] field.

If I replace the [Home_Address] field with some text (like "No Data") then
it works.

Help would be appreciated.
 
Allen - Very many thanks for your prompt and accurate response
--
Keith W


Allen Browne said:
Try:
=IIf([Home_Address] Is Null,[Manager], Null)

Null is not the same thing as "" (a zero-length string.)

For more info, see:
Common erros with Null
at:
http://allenbrowne.com/casu-12.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
I am trying to create a text field which displays an existing field is
another field is null. The expression I have used is:
=IIf([Home_Address]="",[Manager],Null). Unfortunately this doesn't work in
that nothing is ever displayed, even if there is nothing in the
[Home_Address] field.

If I replace the [Home_Address] field with some text (like "No Data") then
it works.

Help would be appreciated.
 
Back
Top