Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage Return 1

Status
Not open for further replies.

iamedwardkim

IS-IT--Management
Nov 7, 2002
29
US
Is there a carriage return character? I've been using the combination of Chr(13) and Chr(10). And is there a way to set a variable to multiple carriage returns e.g. CR3 = Chr(13) + Chr(10) + Chr(13) + Chr(10) + Chr(13) + Chr(10) and have this variable accessible from a report? Any help would be greatly appreciated. Thanks.
 
Check out Access help about the intrinsic constants vbCr and vbCrLf. They can be added to strings to perform carriage returns and line feeds......

 
Hello,

you are right with your combination selection and it can be used in a report.
ie in a textbox:
=[FieldName] & Chr(13) & Chr(10) & "some text"

If you are trying to place a carriage return within vba, you can use "vbcrlf". Just make sure you seperate it from your text, like this:
msgbox "First Line" & vbcrlf & "Next line"

Hope that helps!

-Sean
 
I am composing an email using following code.

DoCmd.SendObject acSendQuery, "qryDump", acFormatXLS, _
"akhwaja@woolworths.com.au", _
, , "PNP Data Dump", _
"Please see the attached file containing full data dump of PNP." _
& "Thanks" _
& "AK", True

I tried using these codes before 'thanks' and my name initials but it was not recognised. Could this be used as paet of message and if so, where I am missing out.


Cheers

AK
 
Sure, it would be something like this:
Code:
DoCmd.SendObject acSendQuery, "qryDump", acFormatXLS, _
"akhwaja@woolworths.com.au", _
, , "PNP Data Dump", _
"Please see the attached file containing full data dump of PNP." _
& vbCrLf & vbCrLf & "Thanks" _
& vbCrLf & vbCrLf & "AK", True
A single vbCrLf wraps to the next line, two consecutive ones will essentially insert a blank line....
 
Thank so much. It worked. Appreciate your your help. Cheers

AK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top