Re: Comma in concatenated field
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Tue, 20 Dec 2005 18:53:06 -0600
Bassel wrote:
>I have a test box that combines several fields using IIf statment
>=IIf([cofa]=-1,"AAAAAA") & IIf([cofconf]=-1," , BBBBBB") &
>IIf([cofcomp]=-1," , CCCCC")
>
>My problem is with the comma if [cofa]=0 and [cofconf]=-1 or [cofcomp]=-1
>then the ouput will be
> ,BBBBBB or ,CCCCC
>How to manage the comma to appear only , if there is a value before it.
Here's one way:
=Mid(IIf(cofa,", AAAAAA") & IIf(cofconf,", BBBBBB") &
IIf(cofcomp,", CCCCC"), 3)
--
Marsh
MVP [MS Access]
.
- Prev by Date: Re: Report Footer and Grand Totals on one page
- Next by Date: Re: Comma in concatenated field
- Previous by thread: Re: access data (numbers) do not format correctly in merge to MS word
- Next by thread: Re: Comma in concatenated field
- Index(es):