F
Frank Merlin
Hi,
I have managed to extract first name, middle initial and last name into
individual word in query from a person's name, from there I retreive the
first character of each separated word to be used later in the database, the
problem is, I am facing with overseas clients with their name made up by four
group of characters.
e.g. [Name] = "Thomas Lee Jones Peterson" extract to
"Thomas"
"Lee"
"Jones"
"Peterson"
my query already cater for clients with "normal" name like most of us with
or without middle initial, but I dun know how to seperate the "Peterson" like
example above, can any experts out there please help out?
My existing query as follow:
FirstPart: Left([Name],InStr([Name]," ")-1)
SecondPart: Trim(Mid([name],InStr(1,[name]," ")+1,IIf(InStr(InStr(1,[name],"
")+1,[name]," ")=0,0,InStr(InStr(1,[name]," ")+1,[name]," ")-InStr(1,[name],"
"))))
ThirdtPart: IIf(InStr(InStr([name]," ")+1,[name],"
")<>0,Right([name],Len([name])-InStr(InStr([name]," ")+1,[name],"
")),Right([name],Len([name])-InStr([name]," ")))
FourthPart: ?????????????
Thank you in advance.
I have managed to extract first name, middle initial and last name into
individual word in query from a person's name, from there I retreive the
first character of each separated word to be used later in the database, the
problem is, I am facing with overseas clients with their name made up by four
group of characters.
e.g. [Name] = "Thomas Lee Jones Peterson" extract to
"Thomas"
"Lee"
"Jones"
"Peterson"
my query already cater for clients with "normal" name like most of us with
or without middle initial, but I dun know how to seperate the "Peterson" like
example above, can any experts out there please help out?
My existing query as follow:
FirstPart: Left([Name],InStr([Name]," ")-1)
SecondPart: Trim(Mid([name],InStr(1,[name]," ")+1,IIf(InStr(InStr(1,[name],"
")+1,[name]," ")=0,0,InStr(InStr(1,[name]," ")+1,[name]," ")-InStr(1,[name],"
"))))
ThirdtPart: IIf(InStr(InStr([name]," ")+1,[name],"
")<>0,Right([name],Len([name])-InStr(InStr([name]," ")+1,[name],"
")),Right([name],Len([name])-InStr([name]," ")))
FourthPart: ?????????????
Thank you in advance.