capitlization of the first letter of words in a form text box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

user will enter text usually in one case or another. i would like to try to
format it to cap the first letter of each word.
 
Mcdonald, O'brien, and everyone from Usa will not be happy with that.

You can use the AfterUpdate event of a text box to StrConv() the text, but
it the results are usually less than satisfactory.
 
I agree there are problems with programming the conversion to force "Title
case" in Access, but the following code works:

Option Compare Database
Option Explicit

Function Proper(strToChange As String) As String
' Converts string to Proper case
On Error Resume Next
Proper = StrConv(strToChange, vbProperCase)
End Function
 

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

Back
Top