line break in concatenated text

G

Guest

I want to insert a line break between CompanyName and ContactFirstName so that

=nz([CompanyName]&[ContactFirstName]& " "& [ContactLastName])

displays as:

CompanyName
ContactFirstName ContactLastName
 
F

fredg

I want to insert a line break between CompanyName and ContactFirstName so that

=nz([CompanyName]&[ContactFirstName]& " "& [ContactLastName])

displays as:

CompanyName
ContactFirstName ContactLastName

As the control source of an unbound text control:

=[CompanyName] & chr(13) & chr(10) & [ContactFirstName] & " " &
[ContactLastName]

The chr(13) & chr(10) must be in that order.

In VBA you can use vbNewLine or vbCrLf.
 
G

Guest

Thank You! Thank You!

Al, when I entered yours it invaribly made added brackets making it a field
or whatever

fredg, it worked!

problem solved ~ wish I'd tried this group 4 years ago!
 
A

Al Campagna

SMC,
As a calculated control, use chr(13) & chr(10) to cause the line feed
From module code, vbCrLf would work.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

SMC said:
Thank You! Thank You!

Al, when I entered yours it invaribly made added brackets making it a field
or whatever

fredg, it worked!

problem solved ~ wish I'd tried this group 4 years ago!

SMC said:
I want to insert a line break between CompanyName and ContactFirstName so that

=nz([CompanyName]&[ContactFirstName]& " "& [ContactLastName])

displays as:

CompanyName
ContactFirstName ContactLastName
 

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