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

Newline in String?

P: n/a
Hello everybody

I really can't find out howto add a newline into a simple string. I want to
do something like:

=IIf([req_description]<>"";"Description: " & [req_description];"")

....but with a newline after "Description:". How do I enter a newline?
Thanks for your help

Jean-Pierre
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try:
=IIf(IsNull([req_description]), Null, "Description:" & Chr(13) & Chr(10) &
[req_description])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jean-Pierre Bergamin" <ja***@se-community.com> wrote in message
news:42**********************@news.sunrise.ch...
Hello everybody

I really can't find out howto add a newline into a simple string. I want
to
do something like:

=IIf([req_description]<>"";"Description: " & [req_description];"")

...but with a newline after "Description:". How do I enter a newline?
Thanks for your help

Jean-Pierre

Nov 13 '05 #2

P: n/a
Allen Browne wrote:
Try:
=IIf(IsNull([req_description]), Null, "Description:" & Chr(13) & Chr(10) &
[req_description])


How about
="Description:" + vbCRLF + [req_description]

As (AFAIK) the + concatenator would render the whole expression as null
if req_description was null.

--
[Oo=w=oO]

Nov 13 '05 #3

P: n/a
Yes, that's fine, except the line starting with = made me wonder if this is
the Control Source of a text box? If so the constant (vbCrLf) is not
available.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Trevor Best" <no****@besty.org.uk> wrote in message
news:42***********************@news.zen.co.uk...
Allen Browne wrote:
Try:
=IIf(IsNull([req_description]), Null, "Description:" & Chr(13) & Chr(10)
& [req_description])


How about
="Description:" + vbCRLF + [req_description]

As (AFAIK) the + concatenator would render the whole expression as null if
req_description was null.

--
[Oo=w=oO]

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.