I'm trying to build a query function to split a [FullName] Field in a table into it's parts--[Prefix], [FirstName],[Middle],[LastName],[Suffix] in the same table. Unfortunately, the [FullName] comes to me in many different configurations:
"John Smith"
"John M. Smith"
"Mr. John Smith"
"John Smith, MD."
"Mr. & Mrs. John Smith"
"John and Mary Smith"
"John Smith and Mary Ann Wilson-Smith"
"John M. Smith and Mary Ann Wilson"
"Dr. Mary and Mr. John Smith"
,etc.
So far, I'm looking for " and " or " & " to determine if there's one name or two, and looking for "-" or "," to determine if there's a hyphenated name or a suffix. Am I on the right track, or is there a better way to start?
Can someone point me in the right direction?
Thanks,
Sup
"John Smith"
"John M. Smith"
"Mr. John Smith"
"John Smith, MD."
"Mr. & Mrs. John Smith"
"John and Mary Smith"
"John Smith and Mary Ann Wilson-Smith"
"John M. Smith and Mary Ann Wilson"
"Dr. Mary and Mr. John Smith"
,etc.
So far, I'm looking for " and " or " & " to determine if there's one name or two, and looking for "-" or "," to determine if there's a hyphenated name or a suffix. Am I on the right track, or is there a better way to start?
Can someone point me in the right direction?
Thanks,
Sup