You'll need to use a Form to do this; you can put the following VBA code
into the AfterUpdate event of the textbox. I'll call it txtLastName:
Private Sub txtLastName_AfterUpdate()
' only mess with names that are currently all lower case
If StrComp(Me!txtLastName, LCase(Me!txtLastName), 0) = 0 Then
Me!txtLastName = StrConv(Me!txtLastName, vbProperCase)
End If
End Sub
This will let the user type in "McDaniel" or "van Cleef" and have it left
alone. However, e. e. cummings will be converted in a way which the poet
would not have liked.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.