Inserting carriage return in report field

G

Guest

I'm wanting to insert a carriage return into a report text box that is a
concatentination of two different DB fields. I've tried to set the following
as the data source for the text box:

="Description: " & [projDescription] & chr(13) & chr(13) & "Status: " &
[statStatus]

I think you get the idea. But the carriage returns (chr(13)) don't get
processed as carriage returns.

The reason I am wanting to do this is to prefix each field with an
appropriate label ("Description: " and "Status: ") and to have the statStatus
label and contents appear directly after the projDescription label and
contents. I've tried stacking the fields one on top of the other in the
report design, and setting all to be able to grow and shrink, but there are
other fields to the left and right of these, and their position gets adjusted
by the length of the contents of these fields, which is undesirable.

Any suggestions welcomed.
 
J

John Spencer

Use Chr(13) & Chr(10) to get a new line

="Description: " & [projDescription] & chr(13) & chr(10) & "Status: " &
[statStatus]

If you want a blank line between then

="Description: " & [projDescription] & chr(13) & chr(10) & chr(13) & chr(10)
& "Status: " & [statStatus]

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

John Spencer

Oh, I forgot to mention the ORDER of the Chr(13) & Chr(10) is important. 13
then 10 works. 10 then 13 will not work and will probably display two small
squares.

Computers are awfully finicky.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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