Here is a UDF created by Gabe Gabriel to help us convert a Firstname, Middle Initial, Lastname, Appendage to a form needed for sorting in a database i.e. Lastname, Firstname, Initial, Appendage.

jac="Charles H. Hoens III"
?Nameconvert(jac)
Hoens, Charles H. III

'Date Created: 06-Aug-2005 09:55:13 PM
'Last Updated: 06-Aug-2005 09:55:13 PM
'Created By : g gabriel "With the greatest of thanks!!!"
'Updated By : Charles Hoens
FUNCTION NameConvert AS C (Fullname AS C)
nameconvert=""
dim jac as c
jac=If(lastword(fullname)="Jr.".or.lastword(fullname)="Sr.".or.lastword(fullname)="II".or.lastword(fullname)="III".or.lastword(fullname)="IX".or.lastword(fullname)="V",word(fullname,-2)+", "+word(fullname,1," ",w_count(fullname)-2)+" "+right(fullname,3), word(fullname,-1)+" "+word(fullname,1," ",w_count(fullname)-1))


nameconvert=jac
END FUNCTION


As mentioned before, many thanks to Gabe for the work on this.

Charles H. Hoens