Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

How get rid of second comma in a concatenated field if there is no data in the 2nd field

I have this syntaxin a query designer field but need to get rid of the 2nd comma if there is no data in the field "Address2)

Street Address: [Address1] & IIf([Address2]="","",", " & [Address2])

Right as it stands I get, for example,

1234 West Circle Drive,

but want to get just

1234 West Circle Drive  (no comma)


What is wrong with my syntax?

--Steve
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

Perfect solution.  Thanks.