-----Original Message-----
Because of the variability of peoples' names, there is no single piece of
code that will make this split with complete accuracy; however, you might
want to try the following in an Update Query and then manually correct those
where the name did not fit the pattern. This code will work when your
FullName field has names like:
Mary Anne Smith
George C. Brown
It will not work for names like:
Janet M. van de Velde
For FirstName, put the following in the Update To: row of an update query:
Left([FullName],InStr([FullName]," ")-1)
For MiddleName, put the following in the Update To: row of an update query:
Mid([FullName],InStr([FullName]," ")+1,InStrRev ([FullName],"
")-InStr([FullName]," ")-1)
For LastName, put the following in the Update To: row of an update query:
Mid([FullName],InStrRev([FullName]," ")+1)
hth,
--
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
I need to split a name field in the format [FistName MI
LastName] into 3 new fields [FirstName], [MI], and
[LastName].
Does anyone have the code to do this?
Thanks...
.