Nest IIF in Access 2002

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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]))
 
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]))
 
Back
Top