Paul:
StrConv works fine with 'normal' names but fails on hyphenated names or names that contain an "Mc".
I did this function which accounts for most of that. Not perfect but it has served me well so far:
'This function will take a name typed in in any case and change it to mixed case. If there is a
'space in the name the next letter will be capitalized; if there is a hyphen in the name, the next
'letter will be capitalized; if there is an apostrophe in the name, the next letter will be
'capitalized; if the name begins with Mc, the next letter will be capitalized.
Public Function NameParse(NameIn As String)
Dim intLength As Integer
Dim intloop As Integer
Dim strOutName As String
intLength = Len(NameIn)
strOutName = UCase(Left(NameIn, 1)) & LCase(Mid(NameIn, 2, 1))
For intloop = 3 To intLength
'Tests for hyphen, space or apostrophe in the previous letter position and
'capitalizes the current letter
If Mid(NameIn, intloop - 1, 1) = "-" _
Or Mid(NameIn, intloop - 1, 1) = " " _
Or Mid(NameIn, intloop - 1, 1) = "'" Then
strOutName = strOutName & UCase(Mid(NameIn, intloop, 1))
'Test for the combination Mc in the previous two letter positions and
'capitalizes the current letter
ElseIf Mid(NameIn, intloop - 2, 1) = "m" And Mid(NameIn, intloop - 1, 1) = "c" Then
strOutName = strOutName & UCase(Mid(NameIn, intloop, 1))
'If none of the above conditions evaluate to True, makes the current letter lower case
Else
strOutName = strOutName & LCase(Mid(NameIn, intloop, 1))
End If
Next intloop
NameParse = strOutName
End Function
Larry De Laruelle
larry1de@yahoo.com