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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting a line break into a memo box 1

Status
Not open for further replies.

telephoto

Technical User
Nov 3, 2002
210
0
0
GB
When adding an item to a contract, the item's "notes" memo field is amended.

I want to start a fresh line in the text box, hence the code:
Code:
 txtNotes = txtNotes & vbLf & "This machine added to contract " & CurrentContract & "on " & Left(Now, 10)

The comment is added, but without a fresh line.

Please can someone tell me how to do that?

Thank you
T
 
Try to replace vbLf with either vbCr or vbCrLf

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV suggestion will work, but I am lazy and all I remember for a new line is... [tt]vbNewLine:

txtNotes = txtNotes & vbNewLine & "This machine added to contract " & CurrentCon
[/tt]
:)

Have fun.

---- Andy
 
Although I am also lazy, I typically use an expression that works in vba and a query/control source.
Code:
txtNotes = txtNotes & Chr(13) & Chr(10) & "This machine added to contract " & CurrentCon


Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top