Avatar of SteveL13
SteveL13
Flag 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
Microsoft Access

Avatar of undefined
Last Comment
SteveL13

8/22/2022 - Mon