Formatting Text in a Textbox

  • Thread starter Thread starter Tom & Saundrah Venne
  • Start date Start date
T

Tom & Saundrah Venne

Does anyone know how put a Carriage Return or Line Feed into a textbox. I
have a SQL statement that gets a series of records and I am trying to format
when I display them in a text box. Right now it displays one big paragraph
and I would like to force CR or LF after certain items.

Thanks in advance.
 
Use a calculated field in the query and concatenate the combination of
Chr(13) & Chr(10) into the expression where you want the new line to start.
E.g.,

MyNewLines: [Field1] & Chr(13) & Chr(10) & [Field2] & Chr(13) & Chr(10) &
[Field3]
 
Hey Tom,

I think & vbCrLf & maybe what your looking for.

HTH,
Shane
 
When I tried:
do
temp = temp + recordset(1) + chr(13) + recordset(2) + chr(13) + chr(13)
move next
until eof

I get the little square box representing unprintable characters, what am I
doing wrong


Ken Snell said:
Use a calculated field in the query and concatenate the combination of
Chr(13) & Chr(10) into the expression where you want the new line to
start. E.g.,

MyNewLines: [Field1] & Chr(13) & Chr(10) & [Field2] & Chr(13) & Chr(10) &
[Field3]
--

Ken Snell
<MS ACCESS MVP>


Tom & Saundrah Venne said:
Does anyone know how put a Carriage Return or Line Feed into a textbox.
I have a SQL statement that gets a series of records and I am trying to
format when I display them in a text box. Right now it displays one big
paragraph and I would like to force CR or LF after certain items.

Thanks in advance.
 
Tom said:
When I tried:
do
temp = temp + recordset(1) + chr(13) + recordset(2) + chr(13) +
chr(13) move next
until eof

I get the little square box representing unprintable characters, what
am I doing wrong

Look at Ken's example expression below and then look at yours above. See the
differences?

MyNewLines: [Field1] & Chr(13) & Chr(10) & [Field2] & Chr(13) & Chr(10) &
[Field3]
 
Back
Top