Auto-uppercase first letter of first/last name?

K

Ken Snell

One way to do this (although it's not foolproof) is to use StrConv function
in code that is run in the AfterUpdate event of the textbox:

Private Sub txtBoxName_AfterUpdate()
Me.txtBoxName.Value = StrConv(Me.txtBoxName.Value, vbProperCase)
End Sub

Note that this will capitalize the first letter of each word, which may not
give the right results for nonstandard names:

rosemarie will become Rosemarie even if it should be RoseMarie

etc.
 

Ask a Question

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.

Ask a Question

Top