Box characters appearing instead of carriage returns

  • Thread starter Thread starter Andrew J
  • Start date Start date
A

Andrew J

I have a report with a text box that displays the address
field from data imported from Excel (that originated from
another Access database). The problem is that the
carriage returns are represented by a box or square
character and the address doesn't split up into separate
lines. Any ideas or ways to convert the characters back
to a carriage return?

Thanks in advance.
 
Set focus to this text box,click mouse right button,then pop
menu,select"Propertiy",
Set "Wrap Text" as true.

Aaron _~@
Yang _`\<,_
? (*)/&(*)
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
 
Thanks Aaron, but this is on a report and text boxes on
reports don't have a "wrap text" property.
 
Andrew said:
I have a report with a text box that displays the address
field from data imported from Excel (that originated from
another Access database). The problem is that the
carriage returns are represented by a box or square
character and the address doesn't split up into separate
lines. Any ideas or ways to convert the characters back
to a carriage return?

Thanks in advance.

Andrew,
Excel uses just a single line feed character (chr(10) ) to go to the
next line, whereas Access uses both the carriage return and the line
feed characters, chr(13) & chr(10), (in that order).

You'll need to run an Update query to convert each record that has the
single chr(10) to chr(13) & chr(10).
If you are using Access 2000 or 2002 you can use the Replace() function.

Back up your table first.

Update YourTable Set YourTable.Address =
Replace([Address],chr(10),chr(13) & chr(10))
Where InStr([Address],chr(10)) > 0;
 
Back
Top