GHnat
asked on
Need help in extracting specific components of a name in Access 2007
I have a database, which is travel related and all names appear in one field "PASSENGENAMEUPPER" in the format ...
SMITH/ANDREW MR
JONES/BARBARA MRS
KENT/CLARK WILLIAM MR
I can extract the salutation correctly with:
Salutation: Mid([PASSENGERNAMEUPPER],I nStrRev([P ASSENGERNA MEUPPER]," ")+1)
I can extract the last name correctly with:
Last_Name: Left([PASSENGERNAMEUPPER], InStr([PAS SENGERNAME UPPER],"/" )-1)
But I am stuck with trying to just get the first name and any corresponding second names .. keeping in mnd that some names might have just 1 first name and sime might have multiple. So basically I am looking to extract anything after the slash and before the salutation
Any assistance would be greatly appreciated
Thanks
Gary
SMITH/ANDREW MR
JONES/BARBARA MRS
KENT/CLARK WILLIAM MR
I can extract the salutation correctly with:
Salutation: Mid([PASSENGERNAMEUPPER],I
I can extract the last name correctly with:
Last_Name: Left([PASSENGERNAMEUPPER],
But I am stuck with trying to just get the first name and any corresponding second names .. keeping in mnd that some names might have just 1 first name and sime might have multiple. So basically I am looking to extract anything after the slash and before the salutation
Any assistance would be greatly appreciated
Thanks
Gary
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you ... this worked perfectly!
Gary
Gary
Displays the values that reside in table fields called FirstName and LastName. In this example, the & operator is used to combine the FirstName field, a space character (enclosed in quotation marks), and the LastName field.