Nest IIF in Access 2002

R

Ralph

Any ideas why this doesn't work? the first if executes but the second two do
not.

UseAddressFull: IIf("UpdateAddress1" Is Not Null,[UpdateAddress1] & " " &
[UpdateAddress2],IIf("MailingAddress1" Is Not Null,[MailingAddress1] & " " &
[MailingAddress2],[ResidenceAddress1] & " " & [ResidenceAddress2]))
 
D

Douglas J. Steele

It's because you have the field names in quotes. VBA is checking whether the
string UpdateAddress1 is null (and, of course, it isn't).

UseAddressFull: IIf([UpdateAddress1] Is Not Null,[UpdateAddress1] & " " &
[UpdateAddress2],IIf([MailingAddress1] Is Not Null,[MailingAddress1] & " "
&
[MailingAddress2],[ResidenceAddress1] & " " & [ResidenceAddress2]))
 
Top