Person's name in a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top