Remove comma and appersand if there is no secondary names

I have this in a field in query designer:

Name: [Primary Last Name] & ", " & [Primary First Name] & " & " & [Secondary Last Name] & ", " & [Secondary First Name]

If works fine in there is a secondary last name and a secondary first name.  But if isn't a secondary last name and a secondary first name I get an ampersand an a comma after the [Primary Last Name] & ", " & [Primary First Name].

How can I get rid of those extra characters if there is no [SecondaryLast Name] and [SecondaryFirst Name]

--Steve
SteveL13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
When using the + sign instead of the & the concatenation acts differently. Null + string gives null, whereas Null & string gives string. This can be used in your case like so (test it)
Name: [Primary Last Name] & ", " & [Primary First Name] & (" & " + [Secondary Last Name]) & (", " + [Secondary First Name])
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
try:

=[Primary Last Name] & IIf(Nz([Primary First Name],"")="","",", " & [Primary First Name]) & IIf(Nz([Secondary Last Name],"")="","",", " & [Secondary Last Name])
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.