Actually, it must be Chr(13) & Chr(10), in that order.
An alternative to using the IIf statement would be:
[Address] & (Chr$(13) & Chr$(10) + [Address2])
This takes advantage of the fact that + propagates Nulls, while & doesn't.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
KARL DEWEY said:
Use the IIF statement in your query or in the text box you now use for
Address. Remove the text box that has Address2 as source - it is not
needed.
Brueez said:
I pasted your suggestion directly into my report design and what I got
was a
"box" between Address & Address2; still on the same line. What do you
think
went wrong?
:
IIF([Address2] Is Null, [Address],[Address]&Chr(13)&[Address2])
:
Can I insert a manual line break in a conditional expression? For
example:
If Address2 is null, print Address; otherwise, print Address, go to
the next
line and print Address2.