By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,054 Members | 1,635 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,054 IT Pros & Developers. It's quick & easy.

Automatic first letter uppercase

P: n/a
When entering a value to a field, is there a way to make only the first
letter upper case without using the Shift Key? For example, entering a
name.

Jan 24 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Well, you can pull the string out, do a UCase(left(1, string)) &
right(len(string)-1, string) on the AfterUpdate event.

A little clumsy, but it's the best I can do on 2 hours sleep...

On Jan 24, 2:12 pm, setab...@hotmail.com wrote:
When entering a value to a field, is there a way to make only the first
letter upper case without using the Shift Key? For example, entering a
name.
Jan 24 '07 #2

P: n/a

You could Also use the StrConv(Value, vbProperCase) to get the first
letter of each word capitilized)

Or use a function ( as ManningFan's would probably throw and error is
the string was an empty string or just one letter)

Function CapitilizeFirstLetter(Value as String) as String
Select Case Len(Value)
Case 0
CapitilizeFirstLetter=""
Case 1
CapitilizeFirstLetter= UCase(Value)
Case Else
CapitilizeFirstLetter=Ucase(Left(Value,1)) & mid(Value,2)
End Select
end function
On Jan 24, 1:10 pm, "ManningFan" <manning...@gmail.comwrote:
Well, you can pull the string out, do a UCase(left(1, string)) &
right(len(string)-1, string) on the AfterUpdate event.

A little clumsy, but it's the best I can do on 2 hours sleep...

On Jan 24, 2:12 pm, setab...@hotmail.com wrote:
When entering a value to a field, is there a way to make only the first
letter upper case without using the Shift Key? For example, entering a
name.- Hide quoted text -- Show quoted text -
Jan 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.