From: David W. Fenton on
John Spencer <spencer(a)chpdm.edu> wrote in
news:#oAOju1ALHA.5464(a)TK2MSFTNGP05.phx.gbl:

> You have made an error in your expression.
>
> " " & MiddleName will always return at least a space.
> The plus sign will see the space and return it.
>
> If you wanted to be safe you could use
> [surname] & ", " & [firstname] & (" " + [middlename])
>
> Although you could still end up with extra spaces if firstName and
> middlename are null you would end up with
> Spencer, and a space. "Spencer, "

This solves all the possibilities:

Mid(("12"+[LastName]) & (", "+(Trim([FirstName]
& (" "+[MiddleName])))),3)

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/