473,320 Members | 1,910 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.

first characters uppercase in textbox

20
Hi evrey one needing you're hlp please can any one tel me how to programme a first characters uppercase in textbox
thank you
Aug 8 '08 #1
8 5713
kadghar
1,295 Expert 1GB
sure, in the change event of the text box, write something like

Expand|Select|Wrap|Line Numbers
  1. if len(textbox1.text) > 0 then
  2.     textbox1.text = ucase(mid(textbox1.text,1,1)) & mid(textbox1.text,2)
  3. end if
HTH
Aug 8 '08 #2
danon
20
I am sorry to say that this does not work what i need is the first characters to be uppecase THE FIRST CHARRACTER ONLY
thanks any way
Aug 8 '08 #3
kadghar
1,295 Expert 1GB
I am sorry to say that this does not work what i need is the first characters to be uppecase THE FIRST CHARRACTER ONLY
thanks any way
That should work for most versions of VB, anyway, remember newer ones (2005 and 2008) have their limitations to suport the MID function, but you can use the SUBSTRING property instead.

Also, since i recomended you to put the code in the CHANGE event, this means it'll only be executed when you write something inside the TextBox (and if the TextBox is named 'TextBox1')

This is just an example of how your code should look, if you want it for your project, you should replace every 'TextBox1' with the correct textbox name, and write it in wichever event you want to triger the code.

NOTE: in newer versions of VB you might have troubles with the LEN function, but you can use the LENGTH property instead.
Aug 8 '08 #4
Glupii
2
I have always done this kind of forced editing on the lostfocus event. That way it activate until one leaves the control (textbox). Just a thought.
Aug 8 '08 #5
danon
20
it steel deosnt work
thanks any way
Aug 13 '08 #6
kadghar
1,295 Expert 1GB
it steel deosnt work
thanks any way
=( really??

maybe your VB version doesnt support UCASE function, then you'll have to check the ascii's out, using CHR and ASC functions.
Aug 14 '08 #7
QVeen72
1,445 Expert 1GB
Hi,

Write this TextBox's LostFocus or Change event:

Text1.Text = StrConv(Text1.Text , vbProperCase)

Keep it Simple :)

Regards
Veena
Aug 16 '08 #8
kadghar
1,295 Expert 1GB
...
Keep it Simple :)

Regards
Veena
Thanks Veena

^.^
Aug 16 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
8
by: MLH | last post by:
I have a textbox on a form into which an alpha-numeric string of data is entered. I wish to force the casual user, who would sometimes use upper case, sometimes not and sometimes MIX the case -...
1
by: Ruby | last post by:
hi... how can I convert user's input in textbox to uppercase, I try to write client-side javascript (onkeypress event), and registered with registeredstartupscript, it worked but there's a delay...
11
by: anony | last post by:
Hello, I can't figure out why my parameterized query from an ASP.NET page is dropping "special" characters such as accented quotes & apostrophes, the registered trademark symbol, etc. These...
1
by: Beffmans | last post by:
How can I turn the Uppercase mode on in my TextBoxes? ch B. *** Sent via Developersdex http://www.developersdex.com ***
4
by: possibilitybox | last post by:
I'm trying to make a unicode friendly regexp to grab sentences reasonably reliably for as many unicode languages as possible, focusing on european languages first, hence it'd be useful to be able...
5
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I force the users to enter characters in uppercase? I want to do this in a TextBox control of an aspx page. Then I want the same to be moved to inside a GridView control. Thanks.
4
by: Hrsoft | last post by:
I'm a newbie with asp.net I need to transform a user textbox to uppercase, when typing. Is this possible? I read about Ajax Maskedit, but it is only to certain formats, like dates, etc Thanks...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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.