Split Full Name into Last and First Name

Local time
Tomorrow, 05:46
Joined
Jul 12, 2006
Messages
70
Is there a way to split the field record into 2? My field name is structured like this: De Jesus, Sheila
I would want to separate the last and given name.
I hate to do it manually because my record currently is now close to 5,000.
 
the code below shows how to split the users name, you need to use this a long side a recordset of the table you wish to update.


Dim strFullName As String
Dim strForeName As String
Dim strSurname As String

strFullName = "De Jesus, Sheila"

strSurname = Left(strFullName, InStr(1, strFullName, ",") - 1)
strForeName = LTrim(MID(strFullName, InStr(1, strFullName, ",") + 1))

Debug.Print strForeName
Debug.Print strSurname
 

Users who are viewing this thread

Back
Top Bottom