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

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Sep 22 10:43:38 CDT 2016


Or maybe you could combine the data in the text box on the report. Something like this

Try setting the ControlSource of the TextBox to:
= ([Field1] + Chr(13) + Chr(10)) & 
  ([Field2] + Chr(13) + Chr(10)) & 
  ([Field3] + Chr(13) + Chr(10))

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman
Sent: Thursday, September 22, 2016 10:22 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] How to Embed Line Feeds in a Single Field that Appears on a Report


 BTW,  you can also do:

 Alt+013 (013 is on the numeric keypad), followed by Alt+010 

 Alt/Enter is a shortcut to get a carriage return/line feed pair of characters.

Jim.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman
Sent: Thursday, September 22, 2016 11:09 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] How to Embed Line Feeds in a Single Field that Appears on a Report


 When you add the data, you have to do it like this:

 "Line1" & chr$(13) & chr$(10) & "Line2" & ...And so on.

 You need to do this in code as you can't type it in that way directly.

 If your typing into the field directly, you can use Alt/Enter

Jim. 

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Thursday, September 22, 2016 10:50 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] How to Embed Line Feeds in a Single Field that Appears on a Report

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

-- 
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