Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text Case (2000)

    I need to convert Upper case text into proper case text not lower case but proper case (names). I tried Proper(<txt string>) but that didn't work. The last time I tried this I had to export to work format the case then reimport it. There has got to be a better way of doing this.

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Case (2000)

    myconvertedtext = StrConv(myoriginaltext, vbProperCase)
    should do the job just nicely.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Text Case (2000)

    Just a warning here. If you use StrConv in a query, you have to feed it the actual numeric value of vbProperCase, which is 3, not the constant. Queries don't recognize constants and you'll get an error if you try it.
    Charlotte

  4. #4
    Lounger
    Join Date
    May 2002
    Location
    Fort Worth, Texas, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Case (2000)

    vbProperCase will turn names like McDonald into Mcdonald. This code allows the user to correct the automatic updates.

    Add a modular level Boolean variable like LNfix (last name fix) and use this code.
    <pre>Private Sub LaseName_AfterUpdate()
    If LNfix = False Then
    LastName = StrConv(LastName, vbProperCase)
    LNfix = True
    End If
    End Sub
    </pre>


  5. #5
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Case (2000)

    Thank all for the tips. The problem is now solved.

Posting Permissions

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