View Full Version : Omit Comma


Lily
01-17-2001, 03:45 PM
Hello,

I used an expression in a query to join the first name and last name fields separated by a comma and then the title...as follows:

Name: [First Name] & " " & [Last Name] & ", " & [Title]

However, how do I get it to omit the comma if there is no title for a particular person. Thank you very much for your help, it is much appreciated.

R. Hicks
01-17-2001, 06:31 PM
Try this:

Name: [First Name] & " " & [Last Name] & IIf(IsNull([Title]), Null, ", " & [Title])

HTH
RDH

Lily
01-17-2001, 06:57 PM
RDH,

Thank you so much again!! It works perfectly, and I thank you for your help.

R. Hicks
01-17-2001, 07:19 PM
No problem, you are very welcome.

RDH