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

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

Similar Threads

IIF in select 4
Conditional statement 2
Query not limited as expected 4
determining if a field should be included 6
IIF Statements nested 5
nested IIF query problem 2
Nested IIf and IsNull 1
Nested IIf Branches 2

Back
Top