adding a Carriage Return or Line Feed character to an update query
Paul wrote:
I'm building an update query that will concatenate two fields and update the
first field with the combination of the two fields. However, I would like
to separate the two components with a blank line, or two carriage return or
line feed characters. In Visual Basic, I'd use vbcr&vbcr to do this. How
can I do this in an update query?
In Access you should use vbCrLf, vbNewLine or Chr(13) &
Chr(10), where the latter sequence will work anywhere and
the two predefined constants pn work in a VBA procedure.
Your query would be something like:
UPDATE thetable
SET fld1 = fld1 & Chr(13) & Chr(10) & Chr(13) & Chr(10) &
fld2
--
Marsh
MVP [MS Access]
|