Upper Case

C

Chris Savedge

Our data entry person has enter all of our contacts into an access table
using all upper case letters.......Is there anyway I can change all of those
names back to the proper form..........meaning can I keep the first letter
upper case and the rest lower case?

Thanks
Chris
 
G

grep

Thanks for a cool experiment to try. Here's what I came up with:

Public Function TCase(SomeWord) As String
Dim WordTemp1, WordTemp2

WordTemp2 = LCase(Right(SomeWord, Len(SomeWord) - 1))
WordTemp1 = UCase(Left(SomeWord, 1))

TCase = WordTemp1 & WordTemp2
End Function

You can use =TCase([FieldName]) as the Update To function in an Update
query. Note that this only works properly for one-word strings. If you
want title case for multiple word strings, you'd have to modify this a
bit. It also won't work right for single letter words (like "a") as is,
but it can be played with.

Hey! Waddaya want for 10 mins of work? (Yes, it took me that long - I
had to figure it out first)

Good luck!

grep
 
M

Michael Daniel

Dim x As String, frm As Form
x = Proper(ParseTextFrom[FieldName](Me!FormName,
1)) 'Proper function checks and corrects case
 

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