How do I add address lines + postcode together with a carriage re.

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

Guest

How do I add several text field together that describe one postal address
into a single expression with each field seperated by a carriage return?
 
Here's how using sql:

SELECT [COMPANY_NAME] & Chr(13) & Chr(10) & [STREET] & Chr(13) & Chr(10) &
[CITY] & Chr(13) & Chr(10) & [STATE] & Chr(13) & Chr(10) & [ZIP_CODE] AS
POSTAL_ADDRESS
FROM tblAddress;

Note: using the Chr(13) function (carriage return) alone will produce little
squares in between your field output. Using the Chr(10) (line feed) with
Chr(13) will successfully insert a line break where you desire it to appear.
 
I posted earlier. I don't know why it didn't save. But here is my solution
using SQL:

SELECT [COMPANY_NAME] & Chr(13) & Chr(10) & [STREET] & Chr(13) & Chr(10) &
[CITY] & Chr(13) & Chr(10) & [STATE] & Chr(13) & Chr(10) & [ZIPCODE] AS
[POSTAL_ADDRESS]
FROM tblAddress;

Note: Using the Chr(13) function (carriage return) alone will result in a
tiny box in between each field output (try it and see). Using the Chr(10)
function (line feed) after Chr(13) produces the results you request.
 
Back
Top