Paul,
First issue... don't use the name "Name" for a table field name. Name
is a reserved word in Access.
As a general rule, always split a name field into, at least, FirstName
and LastName, and... if needed, the Salutatory (Mr./Mrs), MiddleInitial, or
Suffix (Esq/III).
Now... if *ALL* your name entries are of the form FirstName + a space +
LastName, then...
(I'll use the name [FullName] for your current name field)
FirstName = Left(FullName, InStr(FullName," ") -1)
LastName = Mid(FullName, InStr(FullName," ") +1)
This will not work in all cases, such as "Alan Van Scriver", or "John J.
Rockefeller", but hopefully it will work on most entries.
But... you really should break out the FullName into two discrete
fields. Add a FirstName field and a LastNAme field to your table, and
populate those fields with an update query, using the criteria stated above.
Best not to continue with what you have now.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
pauld said:
Karl,
I noticed this thread and I'd like to ask your advice on the opposite
challenge.
The names in my NAME field are "John Smith" and "Frank Jones", etc
I need to create a report that will show the names sorted by last name,
ie,
Jones, Frank...and Smith, John.
How would I do that?
Thanks.
KARL DEWEY said:
I need to combined certain customers first and last name into one
field.
Full Name: [FirstNameField] & " " &[LastNameField]
OR
Name: [LastNameField] & ", " &[FirstNameField]
Can I write a query to do this? And only to the ones that need it?
You need to figure out the criteria for this.
--
KARL DEWEY
Build a little - Test a little
Dustin said:
I need to combined certain customers first and last name into one
field. Can
I write a query to do this? And only to the ones that need it?