Extract Names from Full Name

GohDiamond

"Access- Imagineer that!"
Local time
Today, 05:01
Joined
Nov 1, 2006
Messages
550
I don't want to lose these.

Model Full Name: "Jones, John P." (this was the one not in MS' examples)

Last Name Extract = Jones
lastN = IIf(InStr(1,[Model Full Name],",")=0,"",right([Model Full Name],len([Model Full Name] - (InStr(1,[Model Full Name],",")+2)))

First Name Extract = John
firstN = IIf((InStr(1,[Model Full Name],",")+1)=InStrRev([Model Full Name]," "),Right([Model Full Name],Len([Model Full Name])-(InStr(1,[Model Full Name],",")+1)),Mid([Model Full Name],(InStr(1,[Model Full Name],",")+2),(InStrRev([Model Full Name]," ")-1)-(InStr(1,[Model Full Name],","))))
 
You can send an e-mail to yourself.
This way you will not "lose this" even if John will decide to close AWF
 

Users who are viewing this thread

Back
Top Bottom