Using Chr(val) for carriage return in a text box

  • Thread starter Thread starter davadams
  • Start date Start date
D

davadams

Guest
I have a very quick and hopefully easy question regarding the use of Chr() in a text box.

Depending on selections made in a form, I would like to print out a report in the form of a list of text that reflects the selections made, without any empty lines between text lines. Here is my control source code from the text box: -

=IIf([Forms]![RESULT FORM]![HP]="0.5 HP","Small" & Chr(13),"") & IIf([Forms]![RESULT FORM]![HP]="1.0 HP","Large","")

This works fine with one exception. The Chr(13) does not perform a carriage return, it merely prints a small square on the screen.

When I put in Chr(97) it works as it should (it prints a letter 'a' after the word 'Small'), but none of the non-printable ascii charaters seem to work.

Any ideas?
 
Thanks Rich this helped. :)
 

Users who are viewing this thread

Back
Top Bottom