473,748 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 34082
Well, you can pull the string out, do a UCase(left(1, string)) &
right(len(strin g)-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...@hotmai l.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 CapitilizeFirst Letter(Value as String) as String
Select Case Len(Value)
Case 0
CapitilizeFirst Letter=""
Case 1
CapitilizeFirst Letter= UCase(Value)
Case Else
CapitilizeFirst Letter=Ucase(Le ft(Value,1)) & mid(Value,2)
End Select
end function
On Jan 24, 1:10 pm, "ManningFan " <manning...@gma il.comwrote:
Well, you can pull the string out, do a UCase(left(1, string)) &
right(len(strin g)-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...@hotmai l.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
4822
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
9085
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
6029
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 paragraphs. So far, so good: some of the paragraphs begin with a link, and there are styles in the stylesheet for link, hover etc. The first letter is still displayed as styled for the paragraph's first-letter.
1
4119
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
2251
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 in text, I do it like this <xsl:value-of select="@method"/> This goes perfect. Now I want the first letter of the string in Uppercase:
3
3510
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
8765
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 an entire string. Anyone got a suggestion?
2
9662
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 want to make the first letter into upper case in the document.forms.type.value thank u karthick
1
3539
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, there's a lot of Input Fields to fill-in... Is there a way in AS to make the first letter typed in an uppercase one? I thank you in advance for the help you'll provide.
0
9378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9253
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6798
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6077
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.