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: 742
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: 5,154
Joined: 30-June 11



Try

Chr(13) & Chr(10)

So

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

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

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
River59
post Jan 12 2017, 10:42 AM
Post#3



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



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


Try

QUOTE

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

--------------------
Remember ... Armstrong, Aldrin and Collins flew to the moon and back with a computer system less complex than a modern, programmable toaster ...
Go to the top of the page
 
theDBguy
post Jan 12 2017, 10:44 AM
Post#4


Access Wiki and Forums Moderator
Posts: 70,676
Joined: 19-June 07
From: SunnySandyEggo


Hi Kevin,

Have you tried using <br>? For example,

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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
DanielPineault
post Jan 12 2017, 10:46 AM
Post#5


UtterAccess VIP
Posts: 5,154
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-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
theDBguy
post Jan 12 2017, 10:52 AM
Post#6


Access Wiki and Forums Moderator
Posts: 70,676
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!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
khkeener
post Jan 12 2017, 11:00 AM
Post#7



Posts: 742
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: 5,154
Joined: 30-June 11



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

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

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
theDBguy
post Jan 12 2017, 11:39 AM
Post#9


Access Wiki and Forums Moderator
Posts: 70,676
Joined: 19-June 07
From: SunnySandyEggo


Hi Kevin et al.,

Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
RAZMaddaz
post Jan 12 2017, 11:48 AM
Post#10


UtterAccess VIP
Posts: 9,517
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    25th September 2017 - 08:26 AM