Correct Case

L

Lez

Hi Guys,

Just wondering if anyone knows how I can force the 1st letter in a field to
be uppercase?

TIA

lez
 
T

tina

there is an Access built-in function that applies "proper case", meaning the
first letter of every word is capitalized - and all other letters in the
word are lower case. and of course Access has a function to force *all*
upper case letters. but there is no built-in function for anything like
"sentence case" - first letter of every sentence.

you could build your own function, something along the lines of

If Not IsNull(Me!ControlName) Then
Me!ControlName = UCase(Left(Me!ControlName, 1)) _
& Right(Me!ControlName, Len(Me!ControlName)-1)
End If

run the code in the control's AfterUpdate event procedure.

hth
 
O

Ofer Cohen

You can use a query to display the name as you want
NewFieldName: StrConv([Fieldname],3)

Or in SQL
Select TableName.* , StrConv([Fieldname],3) As NewFieldName From TableName

************************
You can use StrConv in Code in the AfterUpdate Property of a Control to
affect new date entry. Here is a KB article with an example:

http://support.microsoft.com/?id=253911
 
Top