Removing commata from empty concatenated control

T

TC2004

The record source is
=[lastname]&", "&[firstname]&", "&[Degree]

For some records this particular information is empty and in the report I get
, ,

How do I prevent these commata from printing when the record is empty?
 
K

KARL DEWEY

Try this for no last name or no degree ---

=IIF([lastname] Is Null, "", IIF([Degree] Is Null, [lastname]&", &",
"&[firstname], [lastname]&", &", "&[firstname]&", "&[Degree]))
 
D

Douglas J. Steele

Or

=[lastname] & (", " + [firstname]) & (", " + [Degree])


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


KARL DEWEY said:
Try this for no last name or no degree ---

=IIF([lastname] Is Null, "", IIF([Degree] Is Null, [lastname]&", &",
"&[firstname], [lastname]&", &", "&[firstname]&", "&[Degree]))


--
KARL DEWEY
Build a little - Test a little


TC2004 said:
The record source is
=[lastname]&", "&[firstname]&", "&[Degree]

For some records this particular information is empty and in the report I
get
, ,

How do I prevent these commata from printing when the record is empty?
 

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