By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Adding hard return in query

P: n/a
I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john
Feb 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sat, 10 Feb 2007 22:58:01 +0100, john wrote:
I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john
vbCrLf is a VBA constant and won't work outside of VBA code.

Select [Fld1] & chr(13) & chr(10) & [Fld2] as NewField
From Members;

Note also that the chr(13) & chr(10) must be used in that order.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 10 '07 #2

P: n/a
Thanks!
john

"fredg" <fg******@example.invalidschreef in bericht
news:1p******************************@40tude.net.. .
On Sat, 10 Feb 2007 22:58:01 +0100, john wrote:
>I have this simple query:
SELECT [Fld1] & [Fld2] AS NewField
FROM Members;

Now, in this query, I would like to add a hard return between Fld1 and
Fld2.
I tried adding a VbCRLF but that doesn't seem to work. Any ideas?
Thanks,
john

vbCrLf is a VBA constant and won't work outside of VBA code.

Select [Fld1] & chr(13) & chr(10) & [Fld2] as NewField
From Members;

Note also that the chr(13) & chr(10) must be used in that order.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Feb 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.