Thread
:
Firstname plus Middlename??
View Single Post
#
8
June 4th, 2010, 02:54 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
Posts: 7,177
Firstname plus Middlename??
Steve,
Apparently you didn't try my suggestion (or yours) before posting. I tested
both of our expressions. I suggest you also test them.
The whole value inside your parantheses (" " & [middlename]) will never be
null. At the very least, it will be a single space.
--
Duane Hookom
Microsoft Access MVP
NOTE: These public News Groups are ending June 1st. Consider asking
questions at
http://social.answers.microsoft.com/...ddbuz/threads?
"Steve" wrote:
Duane's expression will give a space after the name if there is no middle
name. The expression should be:
=[surname] & ", " & [firstname] + (" " & [middlename])
When the plus sign is followed by parantheses, if anything is null inside
the parantheses the whole value inside the parantheses becomes null. Thus,
if there is no middle name, the string ends at firstname and there is no
trailing space.
Steve
"Duane Hookom" wrote in message
...
Try
=[surname] & ", " & [firstname] & " " + [middlename]
--
Duane Hookom
Microsoft Access MVP
NOTE: These public News Groups are ending June 1st. Consider asking
questions at
http://social.answers.microsoft.com/...ddbuz/threads?
"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...
.
Duane Hookom
View Public Profile
View message headers
Find all posts by Duane Hookom
Find all threads started by Duane Hookom