Removing commata from empty concatenated control

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

Guest

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?
 
Try this for no last name or no degree ---

=IIF([lastname] Is Null, "", IIF([Degree] Is Null, [lastname]&", &",
"&[firstname], [lastname]&", &", "&[firstname]&", "&[Degree]))
 
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?
 
Back
Top