UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Carriage Return Line Feed In Textbox, Access 2007    
 
   
khkeener
post Jan 12 2017, 10:35 AM
Post#1



Posts: 736
Joined: 26-February 04
From: Texas


I have a report that is going to serve as a visitor's log for people coming to a training session. I want to display the presenter's First Name, Last Name and their Organization's Name. I have a textbox set up on the report with its Text Format set at Rich Text.

The verbage in this text box is:
QUOTE
=[FirstName] & " " & [LastName] & [OrganizationName]


I need it to display on the Report as
John Smith
Microsoft Corp


I tried using both crlf and vbcrlf but they end up in the Control Source as:
QUOTE
=[FirstName] & " " & [LastName] & [vbcrlf] & [Organization Name]


I even tried hitting Shift-Return to place OrganizationName underneath the FirstName and LastName fields, but no luck; it comes out as John SmithMicrosoft Corp.

Any ideas?


Kevin
Go to the top of the page
 
DanielPineault
post Jan 12 2017, 10:41 AM
Post#2


UtterAccess VIP
Posts: 4,731
Joined: 30-June 11



Try

Chr(13) & Chr(10)

So

=[FirstName] & " " & [LastName] & Chr(13) & Chr(10) & [Organization Name]

--------------------
Daniel Pineault
2010-2016 Microsoft MVP
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

Vir sapit qui pauca loquitur
Go to the top of the page
 
River59
post Jan 12 2017, 10:42 AM
Post#3



Posts: 1,036
Joined: 7-April 10
From: Detroit, MI



QUOTE
=[FirstName] & " " & [LastName] & [vbcrlf] & [Organization Name]


Try

QUOTE

=[FirstName] & " " & [LastName] & vbcrlf & [Organization Name]

--------------------
All journeys have secret destinations of which the traveler is unaware ... Martin Buber
Go to the top of the page
 
theDBguy
post Jan 12 2017, 10:44 AM
Post#4


Access Wiki and Forums Moderator
Posts: 69,081
Joined: 19-June 07
From: SunnySandyEggo


Hi Kevin,

Have you tried using <br>? For example,

=[FieldName] & "<br>" & [FieldName]

--------------------
Go to the top of the page
 
DanielPineault
post Jan 12 2017, 10:46 AM
Post#5


UtterAccess VIP
Posts: 4,731
Joined: 30-June 11



QUOTE
Have you tried using <br>? For example,


That should work in html, or in Access' case RTF, but will it work in a general sense for plain text?

--------------------
Daniel Pineault
2010-2016 Microsoft MVP
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

Vir sapit qui pauca loquitur
Go to the top of the page
 
theDBguy
post Jan 12 2017, 10:52 AM
Post#6


Access Wiki and Forums Moderator
Posts: 69,081
Joined: 19-June 07
From: SunnySandyEggo


Hi Daniel,

No, not for plain text. Just giving all possible options and I thought the OP mentioned the control is formatted as Rich Text.

Cheers!

--------------------
Go to the top of the page
 
khkeener
post Jan 12 2017, 11:00 AM
Post#7



Posts: 736
Joined: 26-February 04
From: Texas


Thanks DbGuy, that worked perfectly. After seeing that, I seem to remember another project of mine having a similar issue, using <br> fixed it. And yes, I am using Rich Text for the text box.

Thanks again!

Kevin thanks.gif
Go to the top of the page
 
DanielPineault
post Jan 12 2017, 11:25 AM
Post#8


UtterAccess VIP
Posts: 4,731
Joined: 30-June 11



Thank you for the clarification theDBguy. Just wanted to make sure.

--------------------
Daniel Pineault
2010-2016 Microsoft MVP
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

Vir sapit qui pauca loquitur
Go to the top of the page
 
theDBguy
post Jan 12 2017, 11:39 AM
Post#9


Access Wiki and Forums Moderator
Posts: 69,081
Joined: 19-June 07
From: SunnySandyEggo


Hi Kevin et al.,

Cheers!

--------------------
Go to the top of the page
 
RAZMaddaz
post Jan 12 2017, 11:48 AM
Post#10


UtterAccess VIP
Posts: 9,279
Joined: 23-May 05
From: Bethesda, MD USA


QUOTE
formatted as Rich Text


Um, WOW!!!

What is "Rich Text" and when else might I need to format a Text Box like this is order to do something/anything!

Thanks!

EDIT: One other thing I had to do in order to see the LastName & Organization, is change the "Can Grow" under the format Tab to "Yes."

RAZMaddaz
This post has been edited by RAZMaddaz: Jan 12 2017, 12:04 PM
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    28th March 2017 - 06:34 PM