I'm working on another list of names that I need to parse into 3 sections (first, Last, Degree. . .they are doctors).
I'm having trouble with first name in some instances when there is a suffix (i.e. Jr. or III).
The format is always Last Name, First Name, Degree
I'm using the following to parse the first name:
Trim(Mid([TempName],InStr(1,[TempName]," ")+1,InStr(InStr(1,[TempName]," "),[TempName],", ")-InStr(1,[TempName],",")-2))
This works fine if the name is: Smith, John, MD, but if it is Smith Jr, John, MD then the first name doesn't parse at all. . .I get a "data conversion type error". I'm sure it has something to do with extra space, but I don't know how to deal with that.
Any help or suggestions is much appreciated as always!
I'm having trouble with first name in some instances when there is a suffix (i.e. Jr. or III).
The format is always Last Name, First Name, Degree
I'm using the following to parse the first name:
Trim(Mid([TempName],InStr(1,[TempName]," ")+1,InStr(InStr(1,[TempName]," "),[TempName],", ")-InStr(1,[TempName],",")-2))
This works fine if the name is: Smith, John, MD, but if it is Smith Jr, John, MD then the first name doesn't parse at all. . .I get a "data conversion type error". I'm sure it has something to do with extra space, but I don't know how to deal with that.
Any help or suggestions is much appreciated as always!