vbcr into textbox - issues

spinkung

Registered User.
Local time
Today, 20:15
Joined
Dec 4, 2006
Messages
267
hi all,

I am trying to append several rows of comments from a table to a single text box. I am trying to put each new row on a new line using 'vbcr' but when i check the text box the rows are not on seperate lines but seperated with black lines as below......

comment1lcomment2lcomment3lcomment4etcl

here's what i'm using....
Code:
Do
Me.comments.Value = LTrim(RTrim(rs1("comments").Value)) & vbCr & Me.comments.Value
rs1.MoveNext
Loop Until rs1.EOF

Can anyone help?

Cheers,
Spinkung.
 
a carriage return returns the cursor position to the beginning of the current line. try vbCr & vbLf. Its the line feed that actually throws a new line.
 
Or use the combined constant of vbCrLf. BTW, as the originator of the duplicate posts, when *you* edit those posts, delete is one of your options. It will help the moderator.
 
Also, depending on your character set for that box, vbCR and vbLF might echo as funky characters anyway. Remember that Access is NOT a word processor so it doesn't know what a <CR> or <LF> really means.
 
Doing a chr(10) & chr(13) is also something you might want to use. It is what is needed in a Report's textbox since vbCR, vbLF, vbCRLF, vbNewline, or any other vb* constant is not recognized.
 
It may not make a difference but the CrLf sequence is Chr(13) & Chr(10).
 
It may not make a difference but the CrLf sequence is Chr(13) & Chr(10).

Yes, yes, that is what I meant. Do not use the 10 then 13 as my previous post stated, 13 -> 10 is the correct order and order does matter. Thanks for correcting me Rural.
 

Users who are viewing this thread

Back
Top Bottom