Carriage Return in Report - Textbox

  • Thread starter Benjamin Z. Gregorian
  • Start date
B

Benjamin Z. Gregorian

Hi there,

as I tried to put two strings together with the following code as a
control source to a textbox in a report I got not the intended result.

CODE:
=(e-mail address removed)
 
R

Rick Brandt

Benjamin said:
Hi there,

as I tried to put two strings together with the following code as a
control source to a textbox in a report I got not the intended result.

CODE:
=+chr(13)+[hp][/QUOTE]

Access requires both a Carriage Return and a Line Feed (in that order). Also it
is better to use "&" for concatenation as "+" propogates Nulls (unless that was
your intention).

=[email] & chr(13) & Chr(10) & [hp]
 
B

Benjamin Z. Gregorian

Rick said:
Benjamin said:
Hi there,

as I tried to put two strings together with the following code as a
control source to a textbox in a report I got not the intended result.

CODE:
=+chr(13)+[hp][/QUOTE]


Access requires both a Carriage Return and a Line Feed (in that order). Also it
is better to use "&" for concatenation as "+" propogates Nulls (unless that was
your intention).

=[email] & chr(13) & Chr(10) & [hp]
[/QUOTE]
Unfortunately in my case it shows not the expected result but now I see
two caros instead of one.

Benjamin
 
R

Rick Brandt

Benjamin said:
Rick said:
Benjamin said:
Hi there,

as I tried to put two strings together with the following code as a
control source to a textbox in a report I got not the intended
result.

CODE:
=+chr(13)+[hp][/QUOTE]


Access requires both a Carriage Return and a Line Feed (in that
order). Also it is better to use "&" for concatenation as "+"
propogates Nulls (unless that was your intention).

=[email] & chr(13) & Chr(10) & [hp]
[/QUOTE]
Unfortunately in my case it shows not the expected result but now I
see two caros instead of one.

Benjamin[/QUOTE]

Are you positive you did the Chr(13) first? It will not work if Chr(10) is
first.
 
B

Benjamin Z. Gregorian

Rick said:
Access requires both a Carriage Return and a Line Feed (in that
order). Also it is better to use "&" for concatenation as "+"
propogates Nulls (unless that was your intention).

= & chr(13) & Chr(10) & [hp]
[/QUOTE]

Unfortunately in my case it shows not the expected result but now I
see two caros instead of one.

Benjamin[/QUOTE]


Are you positive you did the Chr(13) first? It will not work if Chr(10) is
first.
[/QUOTE]

You were right! Thank you

Benjamin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top