Setting a text field to first letter UpperCase

J

JackBuff

How can I format a text box to start with Uppercase first letter. I am using
the text box to capture names and would like to start them with a capital
letter and then the remaining as lower case.
 
A

Allen Browne

Jack, you can do this in the AfterUpdate event procedure of the text box as
shown below.

However, this is still going go give you problems with people such as:
van Leen
Von Trap
McDonald

Private Sub Text1_AfterUpdate
With Me.[Text1]
If Len(.Value) > 1 Then
.Value = StrConv(Left(.Value,1), vbUpperCase) & Mid(.Value, 2)
End If
End With
End Sub
 
Top