ASCII chr for new line or carriage return

  • Thread starter Thread starter McLean J
  • Start date Start date
M

McLean J

I am trying to use a SQL statement in a module to add
notes to a notes field. I want it to take the current
notes, add a line break, then add the comments from the
open form.

I am using as part of the statement...
[memNotes]=[memNotes] & Chr(13) & [newComm]

All I get is a little black bar. I've tried (10) as well
and neither seems to work. Am I doing something wrong or
is there a better ASCII code to use?

McLean
 
You need to use both characters:

[memNotes]=[memNotes] & Chr(10) & Chr(13) & [newComm]

hth,
 
In ACCESS, you use the combination of the CR and LF characters.

[memNotes]=[memNotes] & Chr(13) & Chr(10) & [newComm]
 
[memNotes]=[memNotes] & Chr(13) & [newComm]

vbNewLine is a built-in constant that is guaranteed to be the correct
sequence for whatever OS is running -- remember that VBA is now available
on the Mackintosh.

MemNotes = MemNotes & vbNewLine & NewComm


HTH


Tim F
 
Back
Top