I have carriage returns that used to show up in Excel, but now show up
as vertical bars or boxes in Access. How do I find out what ASCII code
goes with those boxes, so I can do a REPLACE?
Thanks,
Rachel
John Spencer - 13 May 2008 16:06 GMT
Probably those are Chr(10) (Line Feeds).
Try replacing with Chr(13) & Chr(10) (Carriage Return plus Line Feed).
UPDATE YourTable
SET YourField = Replace([YourField],Chr(10),Chr(13) & Chr(10))
WHERE YourField Like "*" & Chr(10) & "*"
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
> I have carriage returns that used to show up in Excel, but now show up
> as vertical bars or boxes in Access. How do I find out what ASCII code
> goes with those boxes, so I can do a REPLACE?
>
> Thanks,
> Rachel
John W. Vinson - 13 May 2008 16:08 GMT
>I have carriage returns that used to show up in Excel, but now show up
>as vertical bars or boxes in Access. How do I find out what ASCII code
>goes with those boxes, so I can do a REPLACE?
>
>Thanks,
>Rachel
It's almost certainly a linefeed, Chr(10). Make a backup of the database and
run a query updating the field to
Replace([fieldname], Chr(10), Chr(13) & Chr(10))
to replace the linefeed with a carriage return-linefeed pair.

Signature
John W. Vinson [MVP]