AFAIK, there's no such function as +IIf in VBA. If I had to guess, I'd say
that the + is simply arithmetic: add the results of the IIf function to
whatever preceeded it.
If you're trying to add the values, leave out the ampersand. The first +
sign doesn't seem to be doing anything. You can also use + as a
concatenation operator if you want the concatenation to return Null if any
of the values are Null. For instance:
will evaluate this part of the expression to Null if Address2 is null:
([Address2] + Chr(13) + Chr(10))
If there is no Address2 field, the carriage return and line feed Chr(13) +
Chr(10) become part of the null expression within parentheses, and are in
effect skipped, which means there won't be an empty space in the address
where the Address2 field would be.
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.