# Access - Capitalize first letter



## Diane Herron (Dec 28, 2000)

I know that I can capitalize the entire word in Access by formatting using the > symbol. Is there a way to capitalize just the first letter and all other letters be in lower case?


----------



## RandyG (Jun 26, 2000)

Which version of Access are you using?

I checked in Acess 2000 and found


> StrConv Function
> 
> Returns a Variant (String) converted as specified.
> 
> ...


----------



## Diane Herron (Dec 28, 2000)

I use Access 97.

I'm sorry, but the answer is like a foreign language to me. What do I do with this information? Where do I put it? 

Maybe if I further explain, it will be simpler to answer.

If I have a table with a field named Branches, I would like for the data in this field to appear with an initial cap and all other letter to be in lower case. That is even if the person entering data does so in all caps or in all lower case.

Is there a simpler answer? For someone who's just slightly above an amateur in using Access?


----------



## RandyG (Jun 26, 2000)

I was hoping that would spark your memory, as I'm about the same level.

Seriously, I searched about in Access 2000 for something to help you, but could only find how to change to all uppers, all lowers, or Title case, as in above.

I have found an external link with the code to make sure that mixed case names are displayed correctly, but nothing else on forcing sentence case, beyond an autocorrect funtion outlined below. I believe you should be able to use the Input Mask in the properties of the box, to force the way something looks, but that is not working properly on my computer,a nd can't confirm it for you.


> Access 97 has a feature called AutoCorrect that can automatically correct your mistakes and reduce your typing time. Use AutoCorrect to correct typing errors, correct two capital letters in a row, correct the accidental use of Caps Lock, capitalize names of days, capitalize the first letters following a period and a space character (defined as a sentence), and correct text you type (such as replacing misspelled words). If you have used Word 97 or other Office 97 products, AutoCorrect might be familiar to you.
> 
> AutoCorrect only works when you are adding data to a table, query, or form. It does not work in Design View of any object, nor while you are programming.
> 
> ...


----------



## RandyG (Jun 26, 2000)

OK, I was looking for something on an Excel site, and cam across this nifty little code, which should work for Access, or at least inmy mind it should!!


> Sub ConvertToProperCase()
> Dim Rng As Range
> For Each Rng In Selection.Cells
> If Rng.HasFormula = False Then
> ...


Pop that in and see if it works! It is supposed to put everything typed in the field in Proper Case, just what you are looking for.

http://www.cpearson.com/excel/case.htm is where I got the code from.


----------

