[AccessD] How to Embed Line Feeds in a Single Field that Appears on a Report

Stuart McLachlan stuart at lexacorp.com.pg
Thu Sep 22 15:06:58 CDT 2016


You can't type the Chr$() directly into the tetxt, if you do, it's still just text.
When entering text manually into a field in a table. press Ctrl+Enter where you want the Line 
feed.  That will actually put a CR and a LF character in the text.



On 22 Sep 2016 at 14:49, Brad Marks wrote:

> For testing, I built a small Access application with one table.
> 
> In this table, I added three fields;
> Short text
> Long Text (Plain Text format)
> Long Text (Rich Text format)
> 
> I then added this data to each of the three fields in the table
> 
> Line1 Chr$(13)  Chr$(10) Line2
> 
> I then built a small report to display these three fields.
> 
> Here is what I see on the report for each of the three fields -
> 
> Line1 Chr$(13)  Chr$(10) Line2
> 
> 
> I was hoping to see this
> 
> Line1
> Line2
> 
> 
> 
> 
> 
> Brad 
> 
> 
> 
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf
> Of Stuart McLachlan Sent: Thursday, September 22, 2016 9:21 AM To:
> Access Developers discussion and problem solving
> <accessd at databaseadvisors.com> Subject: Re: [AccessD] How to Embed
> Line Feeds in a Single Field that Appears on a Report
> 
> If vbCrLf doesn't work (it only works in VBA, not in queries), use
> Chr$(13) & Chr$(10) in its place.
> 
> 
> 
> On 22 Sep 2016 at 14:08, John Bodin wrote:
> 
> > Brad, if you put in vbCrLf's and Chr(9)'s when building your Single
> > Field, does the report strip them out?
> > 
> > 
> > So does "Hello" & vbCrLf & "World" & vbCrLf & "Hello" & chr(9) &
> > "World" produce
> > 
> > 
> > Hello
> > 
> > World
> > 
> > Hello   World
> > 
> > 
> > or simply
> > 
> > 
> > HelloWorldHelowWorld
> > 
> > 
> > John
> > 
> > 
> > 
> > 
> > 
> > John Bodin
> > 
> > sBOR Office Systems
> > 
> > jbodin at sbor.com<mailto:jbodin at sbor.com>
> > 
> > 
> > 
> > 
> > ________________________________
> > From: AccessD <accessd-bounces at databaseadvisors.com> on behalf of
> > Brad Marks <bradm at blackforestltd.com> Sent: Thursday, September 22,
> > 2016 9:32 AM To: Access Developers discussion and problem solving
> > Subject: [AccessD] How to Embed Line Feeds in a Single Field that
> > Appears on a Report
> > 
> > All,
> > 
> > We have a rather complicated Access report (Shop Work Order). 
> > Currently there is a single field near the top of this report that
> > displays information that is entered manually into our manufacturing
> > system.  Our users control how this information appears on the
> > report by entering the info with line breaks and tabs.
> > 
> > This single field on the report is set up to "Grow" because the
> > amount of data can vary widely, from 0 lines up to maybe 20-30
> > lines.
> > 
> > We are now changing our processing and the information that was
> > previously entered manually will now be coming from one or more
> > "detail" records in the manufacturing database.
> > 
> > I am planning to combine the data from these detail records into a
> > single field (in a temporary table) which will be mapped to the
> > field on the report. So far, this works nicely, except for one
> > issue.
> > 
> > I am not sure how to embed "line feeds" and tabs in this one single
> > field when this field is being constructed from the detail records.
> > 
> > Thanks,
> > 
> > Brad Marks
> > 
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > 
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list