Auto-uppercase first letter of first/last name?

  • Thread starter Thread starter Lauri
  • Start date Start date
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.
 
Back
Top