473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Automatic first letter uppercase

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
2 34016
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nacho | last post by:
i need to convert the first letter of a veriable to uppercase (the veriable is loaded and the applied LCase() ) thanks -- Nacho
4
by: dave | last post by:
Hi How to make first letter of word in upper case? i.e. hello should return Hello Is there any inbuilt function?? Thanx dave
12
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on...
1
by: Dwight Shubert | last post by:
Hi all, This is my first try using Access. I understand how to format a text field for uppercase and lowercase, but how do you capitalize only the first letter of each word? tia Dwight
2
by: blabla120 | last post by:
In an element of my source xml file, II have an attribute method="getSurfaceNumber". I want to make a XSL transformation to a target file. In the target file, I want to give out the mehod name...
3
by: shapper | last post by:
Hello, How can I make the first letter of a string to be upper case and all the others lower case? Thanks, Miguel
5
by: Middletree | last post by:
I want to take a value that users type into a field (actually 2 fields--first and last name) and convert the first letter to Upper Case. I htought I could use UCase, but it seems to only work for...
2
karthickkuchanur
by: karthickkuchanur | last post by:
if((document.forms.employeeId.value == 0) && (document.forms.applicantId.value == 0)) { alert("Please Select the "+document.forms.type.value+" Code or Name"); return false; } i...
1
by: Germaris | last post by:
Hi there! Nowadays trend is to write everything in lowercase. Last Names, First Names, City Names, etc... Maybe the use of computers is one of the reasons to such bad typing. In a form,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.