I have a field in a database that holds the name of individuals like this
"Williams, Tony" it is one field not made up of first name and surname
fields. Is there an expression which would enable me to show the data in this
field in a control on a report like "Tony Williams"
Thanks
Tony
I would strongly suggest changing the design of the table to contain both a
firstname and lastname field (and if you wish, fields for title, middlenames,
and suffix so you could handle "Williams, Dr. Tony James Robert Jr." if that
should be necessary. It's dead easy to concatenante multiple fields into one
display:
([Title] + " ") & LastName & (", " + [FirstName]) & (" " + [MiddleNames]) & ("
" + [Suffix])
for example - or [FirstName] & " " & [LastName] - or whatever is needed.
You can do so by adding the FirstName and LastName fields, and updating
LastName to
Left([yournamefield], InStr([yourfieldname], ",") - 1)
and FirstName to
Trim(Mid([yourfieldname], InStr([yourfieldname], ",") + 1)
Then search for records containing a blank in FirstName and fix manually (or
with some more complicated programming).