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

Show text with carriage returns?

Status
Not open for further replies.

Cineno

Programmer
Jul 24, 2006
142
US
Hello. I have a macro that I takes text from a cell in Excell and stores it in a table named "Jobs" under the attribute "Comments." I also have a report that I want to display what is in "Comments."

Currently when I do this, if the user put more than one paragraph in the cell (entered a carriage return), then in the report when it displays what's in "Comments" I get that white square thing coming up where the return was entered.

How should I go about this? Should I do something in the macro while reading it in, or in the report while displaying it, or what? Thanks for any help.
 
The little square thing might be either Chr(13) or Chr(10). You need both to create a paragraph break. Consider using an expression in your control source like:

=Replace([Comments],Chr(10), Chr(13) & Chr(10) )
or
=Replace([Comments],Chr(13), Chr(13) & Chr(10) )

Make sure the name of your text box is not Comments.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top