From: John W. Vinson on
On Thu, 4 Mar 2010 13:02:01 -0800, Owl <Owl(a)discussions.microsoft.com> wrote:

>OOPS! It's still not right. I am getting the following with the previous
>attempt:
>
>Mike
>Wilson, Mary
>Jones,
>
>The first two are fine. However, I don't want a comma following the
>surname. Can you help me get rid of it, please, based on the criterion in my
>previous response, I would imagine.

Reposting, in case you didn't get it:


Sorry.... I was answering the question that you actually asked, rather than
the one you intended to ask: to quote,

Surname, FirstName
but if there is no Surname, then:
FirstName (without the space and the comma)

I take it that you have three possibilities: only a surname (in which case you
just want that); only a firstname (in which case you just want it); or both,
in which case you want the comma? If so, you'll need some complexity:

[Surname] & (Iif(IsNull([Surname]) OR IsNull([LastName], "", ", ") &
[Lastname]

--

John W. Vinson [MVP]