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

J

JO-Broag

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?
 
T

Todd

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.
 
T

Todd B.

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.
 
T

Todd B.

Use either the Left([Customer Number],2) function or Mid([Customer
Number],1,2) function.
 
Top