Next Line (Expression in Report)

V

Vinnie

Greetings,

I cannot for the life of me figure out how to this:

I want to advance to the next line when writing an Expression .

Example:
=[Address1] & " " & [Address2] <NEW LINE> & " " & [City] & " ," & " " &
[State] & " " & [ZipCode]

<NEW LINE> This is where I would like it to Skip to the Next Line.
Desired Result:
Address1 Address 2
City, State Zip

Result I am Getting:
Address1 Address 2 City, State Zip

I have tried ENTER; CTRL ENTER....No luck . It looks Correct in the
Expression builder, but when in View, no dice.

How do I do this?

As always, your help is appreciated !

Vinnie
 
D

Douglas J. Steele

=[Address1] & " " & [Address2] & vbCrLf & [City] & " ," & " " & [State] & "
" & [ZipCode]

or

=[Address1] & " " & [Address2] & Chr(13) & Chr(10) &[City] & " ," & " " &
[State] & " " & [ZipCode]


(In VBA, you can use vbCrLf. In a query, you have to use Chr(13) & Chr(10)
in that order)
 
V

Vinnie

Awesome...
Thanks again !




Douglas J. Steele said:
=[Address1] & " " & [Address2] & vbCrLf & [City] & " ," & " " & [State] &
" " & [ZipCode]

or

=[Address1] & " " & [Address2] & Chr(13) & Chr(10) &[City] & " ," & " " &
[State] & " " & [ZipCode]


(In VBA, you can use vbCrLf. In a query, you have to use Chr(13) & Chr(10)
in that order)



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Vinnie said:
Greetings,

I cannot for the life of me figure out how to this:

I want to advance to the next line when writing an Expression .

Example:
=[Address1] & " " & [Address2] <NEW LINE> & " " & [City] & " ," & " " &
[State] & " " & [ZipCode]

<NEW LINE> This is where I would like it to Skip to the Next Line.
Desired Result:
Address1 Address 2
City, State Zip

Result I am Getting:
Address1 Address 2 City, State Zip

I have tried ENTER; CTRL ENTER....No luck . It looks Correct in the
Expression builder, but when in View, no dice.

How do I do this?

As always, your help is appreciated !

Vinnie
 

Ask a Question

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.

Ask a Question

Top