How to eliminate comma

J

jmuirman

In this field: ClientFullandTitle: [ClientFull] & ", " & [ctitle] I
sometimes don't have the person's title and the comma appears anyway - how
can I correct?

Thanks,

John
 
K

Ken Snell [MVP]

Take advantage of the fact that a Null value (no client title value) will
propogate through a + operation, but not through a & operation:

ClientFullandTitle: [ClientFull] & (", " + [ctitle])
 
T

Tom Lake

jmuirman said:
In this field: ClientFullandTitle: [ClientFull] & ", " & [ctitle] I
sometimes don't have the person's title and the comma appears anyway - how
can I correct?

ClientFullandTitle: IIf(IsNull([ctitle]), [ClientFull], [ClientFull] & ", "
& [ctitle] I )

Tom Lake
 
J

jmuirman

Thanks Ken - it's perfect!

John

Ken Snell said:
Take advantage of the fact that a Null value (no client title value) will
propogate through a + operation, but not through a & operation:

ClientFullandTitle: [ClientFull] & (", " + [ctitle])

--

Ken Snell
<MS ACCESS MVP>


jmuirman said:
In this field: ClientFullandTitle: [ClientFull] & ", " & [ctitle] I
sometimes don't have the person's title and the comma appears anyway - how
can I correct?

Thanks,

John
 
Top