Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2007

Tip: Looking for answers? Try searching our database.

Inserting carriage return in report field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stu W - 31 Jan 2007 18:21 GMT
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.
John Spencer - 31 Jan 2007 18:46 GMT
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]

Signature

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

> 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
[quoted text clipped - 19 lines]
>
> Any suggestions welcomed.
Stu W - 31 Jan 2007 20:16 GMT
Thanks John.  Worked well.  I had tried chr(10) and chr(13), but not both
together.
John Spencer - 31 Jan 2007 20:47 GMT
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.

Signature

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

> Thanks John.  Worked well.  I had tried chr(10) and chr(13), but not both
> together.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.