View Single Post
  #2  
Old June 3rd, 2010, 06:54 PM posted to microsoft.public.access.reports
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Firstname plus Middlename??

There are several ways including an IIF statement.

=[surname] &", " & IIF([middlename] Is Null OR [middlename] = "",
[firstname], [firstname] & " " & [middlename])


--
Build a little, test a little.


"KG" wrote:

Apologies if this is a silly question. I'm trying to combine Lastname,
Firstname Middlename in a report. I have
=([surname]+", "+[firstname]+" "+[middlename]).
The only time it works is if all three fields contain values. As the
majority of players don't have middle names in the database, most of the
report is blank.
Can anyone tell me what I'm doing wrong?
Thanks so much for your help.
Kind regards...