D
David Newmarch
In a query called qryAddressBox I have the following expression to create a
concatenated field ("AddressBox") for use in various reports:
AddressBox: qryAddresses!Line1 & IIf(IsNull(qryAddresses!Line1),Null,Chr(13)
& Chr(10)) & qryAddresses!Line2 & IIf(IsNull(qryAddresses!Line2),Null,Chr(13)
& Chr(10)) & qryAddresses!Line3 & IIf(IsNull(qryAddresses!Line3),Null,Chr(13)
& Chr(10)) & qryAddresses!Line4 & IIf(IsNull(qryAddresses!Line4),Null,Chr(13)
& Chr(10)) & qryAddresses!Country
In the underlying query (qryAddresses) Line1, Line2, Line3, and Line4 are
fields from one table (tblClients) and Country is a field from a related
table (tblCountries).
My problem is that if the Line4 field is empty then the Country line doesn't
close up and I get a blank line where Line4 would be (no problem if there's
an empty field for any of the first three lines).
How do I get around this?
concatenated field ("AddressBox") for use in various reports:
AddressBox: qryAddresses!Line1 & IIf(IsNull(qryAddresses!Line1),Null,Chr(13)
& Chr(10)) & qryAddresses!Line2 & IIf(IsNull(qryAddresses!Line2),Null,Chr(13)
& Chr(10)) & qryAddresses!Line3 & IIf(IsNull(qryAddresses!Line3),Null,Chr(13)
& Chr(10)) & qryAddresses!Line4 & IIf(IsNull(qryAddresses!Line4),Null,Chr(13)
& Chr(10)) & qryAddresses!Country
In the underlying query (qryAddresses) Line1, Line2, Line3, and Line4 are
fields from one table (tblClients) and Country is a field from a related
table (tblCountries).
My problem is that if the Line4 field is empty then the Country line doesn't
close up and I get a blank line where Line4 would be (no problem if there's
an empty field for any of the first three lines).
How do I get around this?