Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello, other than an imput mask is there a way that first letters can be auto capitalised in a form field. I have tried with an input mask but it seems (and granted I am not the best) that it is too rigid.


    Thanks, Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can use the After Update event of the text box bound to the field. Let's say the text box is named CompanyName.

    If you want to capitalise the first letter of every word:

    Code:
    Private Sub CompanyName_AfterUpdate()
      Me.CompanyName = StrConv(Me.CompanyName, vbProperCase)
    End Sub
    If you only want to capitalise the first letter of the first word:

    Code:
    Private Sub CompanyName_AfterUpdate()
      Me.CompanyName= UCase(Left(Me.CompanyName, 1)) & Mid(Me.CompanyName, 2)
    End Sub

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Hans

    D.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •