reformatting text??

M

momtaz

I've created an access query & report. When i run the report i get small non
printable squares separating the text. i'd like to replace thses squares
with a carraige return but i've go no idea how to do this. Can anyone help??
 
K

Ken Sheridan

You need to insert both a carriage return, Chr(13), and a line feed, Chr(10),
so as the ControlSource of a control in the report for instance you might put:

=[AddressLine1] & Chr(13) & Chr(10) & [AddressLine2] & Chr(13) & Chr(10) &
[City]

to show the two address lines and the city on three separate lines. Or you
could do similarly in a computed column in a query by putting the following
(all on one line) in the 'field' row of a blank column in design view:

FullAddress:[AddressLine1] & Chr(13) & Chr(10) & [AddressLine2] & Chr(13) &
Chr(10) & [City]

Ken Sheridan
Stafford, England
 
J

John W. Vinson

I've created an access query & report. When i run the report i get small non
printable squares separating the text. i'd like to replace thses squares
with a carraige return but i've go no idea how to do this. Can anyone help??

Not without seeing the query, no. Please open the query in SQL view and post
it here.

It sounds like you may somehow be inserting a nonprintable character - such as
a carriage return or linefeed - within text strings. A new line can be
inserted using Chr(13) & Chr(10) (both a CR and a LF, in that order).
 

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