Person's name in a report

E

EllenM

Hello,
How can I express a name comprised of several fields in a report control? I
think I have the basic idea:
=[first]&" "&[last].

But how do you add title and middle initial if they exist? And Jr, Sr if it
exists?

Thanks in advance,
Ellen
 
F

FonsPonsio

Hi Ellen, Your basic premise is correct, however I think you may have
contional puctuation that you want to avaid if a particular field is blank.
For Instance
Title1 = Mr.
Title2 = Mrs.
LName= Last Name
etc.
Now potentially some addresses may have only Mr. or some may have only Mrs.
and others may have both.

The result you would want is either
Mr. Last Name
or Mrs. Last name
or Mr. & Mrs. Last Name

Assuming you always have a Title in Title1 and always a LName, I ususally
use this code:

TotalName= [Title1] & IIF([Title2] is null,"","& " & [Title2]) & [LName]

Hope this helps.
Fons
 

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