Access 2003 add a carriage return, line feed inside a memo field7

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've imported an EXCEL spreadsheet into an Access 2003 database. As a
result, squares showed inside the memo field wherever there had been carriage
return / line feeds in the EXCEL field. I can replace the squares with semi
colons and a blank space, but would prefer to replace the squares with a line
feed / carriage return in Access memo so that the memo field on the report
would print out on a new line - just like it had in EXCEL.
 
A carriage return, linefeed is represented by the ASCII codes 13 (cr) and 10
(lf)
It is represented by the VBA constants vbCrLf or vbNewLine.

The small square you are getting may or may not be that value. To be sure
what is its, you can capture it in a variable, and check the length of it.
(vbCrLf will return a length of 2). Then determine the ASCII value using the
ASC() function for each character it contrains. Once you know that, you can
use the Replace function to change it from whatever it is to vbCrLf
 
Back
Top