A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Carriage Return and Line Feed



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2004, 05:34 PM
JDR
external usenet poster
 
Posts: n/a
Default Carriage Return and Line Feed

How do I insert a carriage return and line feed in a text expression on a
report. i.e. print an address on 3 lines using carriage return and line
feed to accomplish.

Thanks

Jeff...


  #2  
Old July 17th, 2004, 06:55 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default Carriage Return and Line Feed

Carriage return is Chr(13), Line Feed is Chr(10). They MUST be in that
order: Chr(13) & Chr(10).

So if you've got fields Name, Address, City, State, Zip, you could set the
control for the text box on the form to:

= [Name] & Chr(13) & Chr(10) & [Address] & Chr(13) & Chr(10) & [CIty] & ", "
& [State] & " " & [Zip]

or you can add a computed field in your query and simply bind that computed
field to the text box.

In VBA, you can also use the intrinsic constant vbCrLf (but that won't work
in queries)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"JDR" wrote in message
...
How do I insert a carriage return and line feed in a text expression on a
report. i.e. print an address on 3 lines using carriage return and line
feed to accomplish.

Thanks

Jeff...




  #3  
Old August 24th, 2004, 03:53 PM
Dan
external usenet poster
 
Posts: n/a
Default

in a form text box, how could I enter freeform text but also use a LF-CR and
stay in the text box?

"Douglas J. Steele" wrote:

Carriage return is Chr(13), Line Feed is Chr(10). They MUST be in that
order: Chr(13) & Chr(10).

So if you've got fields Name, Address, City, State, Zip, you could set the
control for the text box on the form to:

= [Name] & Chr(13) & Chr(10) & [Address] & Chr(13) & Chr(10) & [CIty] & ", "
& [State] & " " & [Zip]

or you can add a computed field in your query and simply bind that computed
field to the text box.

In VBA, you can also use the intrinsic constant vbCrLf (but that won't work
in queries)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"JDR" wrote in message
...
How do I insert a carriage return and line feed in a text expression on a
report. i.e. print an address on 3 lines using carriage return and line
feed to accomplish.

Thanks

Jeff...





  #4  
Old August 24th, 2004, 04:09 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

"Dan" wrote in message
news
in a form text box, how could I enter freeform text but also use a LF-CR

and
stay in the text box?


Either use Ctl-Enter or change the EnterKeyBehavior property for the
control.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Carriage Return Line Feed Centaur Using Forms 4 July 26th, 2004 09:42 PM
Carriage Return in Imports Ted General Discussion 8 July 12th, 2004 04:15 PM
Word 97 and Word 2002 carriage return differences. Chad Mailmerge 5 June 20th, 2004 09:53 AM
Product Key for Office XP P.G.Indiana Setup, Installing & Configuration 1 June 7th, 2004 03:22 AM
Productkey problem when installing office 2003 on network Stefan Schreurs Setup, Installing & Configuration 1 June 1st, 2004 11:16 PM


All times are GMT +1. The time now is 06:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.