ASCII chr for new line or carriage return

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
 
C

Cheryl Fischer

You need to use both characters:

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

hth,
 
K

Ken Snell

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

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

Tim Ferguson

[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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top