View Single Post
  #4  
Old May 27th, 2004, 02:40 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Carriage Returns in Exprssion Builder...Again

wrote:

=[First Name] & " " & [Last Name] & vbCrLf & [Address] &

[City] & " " & [State] & " " [Zip] & vbCrLf & [Phone] &
vbCrLf & [email]

If this does not work in the expression builder, leave
the textbox unbound and use the following code in the
report open event:

TextboxName = [First Name] & " " & [Last Name] & vbCrLf &
[Address] & [City] & " " & [State] & " " [Zip] & vbCrLf &
[Phone] & vbCrLf & [email]



The problem you have with the above is that vbCrLf is a VBA
defined constant that is not in the name space of control
source or SQL expressions.

You can use Chr(13) & Chr(10) instead, BUT be certain that
you use them in that order, they can not be in the reverse
order.

=[First Name] & " " & [Last Name] & Chr(13) & Chr(10) &
[Address] & Chr(13) & Chr(10) & [City] & ", " & [State] & "
" [Zip] &Chr(13) & Chr(10) & [Phone] & Chr(13) & Chr(10) &
[email]
--
Marsh
MVP [MS Access]