Another Simple Question: Formatting 
Author Message
 Another Simple Question: Formatting

In a form I have a textbox say txtSerial, how can I force the letters in
txtSerial to all turn to CAPITAL LETTERS while the use is typing or on the
LostFocus event.

Thanks in advance



Mon, 08 Dec 2003 20:51:02 GMT  
 Another Simple Question: Formatting
txtSerial.Text = UCase(txtSerial.Text)

If you want it to do that while the user is typing, put it in the Change
event.  If you want it to do that when the user is "finished" typing, put it
in the LostFocus event.

HTH.

-Trevor


Quote:
> In a form I have a textbox say txtSerial, how can I force the letters in
> txtSerial to all turn to CAPITAL LETTERS while the use is typing or on the
> LostFocus event.

> Thanks in advance



Mon, 08 Dec 2003 21:27:23 GMT  
 Another Simple Question: Formatting
use the on_keypress event. It is ascii format so it sucks for unicode
characters but it works better than the on_change event...

--
Egbert Nierop

Session management for webfarms:
http://www.nieropwebconsult.nl/asp_session_manager.htm

Quote:
> In a form I have a textbox say txtSerial, how can I force the letters in
> txtSerial to all turn to CAPITAL LETTERS while the use is typing or on the
> LostFocus event.

> Thanks in advance



Mon, 08 Dec 2003 21:37:13 GMT  
 Another Simple Question: Formatting
The problem with the KeyPress event is that it does not handle code that the
user pastes (via Ctrl-V) into the textbox.  The Change event will handle
that kind of input.

-Trevor


Quote:
> use the on_keypress event. It is ascii format so it sucks for unicode
> characters but it works better than the on_change event...

> --
> Egbert Nierop

> Session management for webfarms:
> http://www.nieropwebconsult.nl/asp_session_manager.htm


> > In a form I have a textbox say txtSerial, how can I force the letters in
> > txtSerial to all turn to CAPITAL LETTERS while the use is typing or on
the
> > LostFocus event.

> > Thanks in advance



Mon, 08 Dec 2003 21:43:00 GMT  
 Another Simple Question: Formatting

Quote:
> txtSerial.Text = UCase(txtSerial.Text)

> If you want it to do that while the user is typing, put it in the Change
> event.

No good putting that in the change event!


Tue, 09 Dec 2003 01:10:01 GMT  
 Another Simple Question: Formatting
You can manipulate textbox entry in a couple of ways:

1) Putz around with UCase$ and LostFocus. (yuck)

    - or -

2) Do it the right way using the built-in capabilities of the control.

See Randy Birch's example at:
http://www.mvps.org/vbnet/code/textapi/txstyles.htm

--
Tim Rude


(remove NOSPAM. for correct email address)

[Please reply via the newsgroup so all can benefit]


Quote:
> In a form I have a textbox say txtSerial, how can I force the letters in
> txtSerial to all turn to CAPITAL LETTERS while the use is typing or on the
> LostFocus event.

> Thanks in advance



Wed, 10 Dec 2003 11:53:14 GMT  
 Another Simple Question: Formatting
Come on Guys,

Why has not somebody thought about using a Mask Edit? Why try to reinvent
the wheel?

Kartik R.


Quote:
> You can manipulate textbox entry in a couple of ways:

> 1) Putz around with UCase$ and LostFocus. (yuck)

>     - or -

> 2) Do it the right way using the built-in capabilities of the control.

> See Randy Birch's example at:
> http://www.mvps.org/vbnet/code/textapi/txstyles.htm

> --
> Tim Rude


> (remove NOSPAM. for correct email address)

> [Please reply via the newsgroup so all can benefit]



> > In a form I have a textbox say txtSerial, how can I force the letters in
> > txtSerial to all turn to CAPITAL LETTERS while the use is typing or on
the
> > LostFocus event.

> > Thanks in advance



Fri, 12 Dec 2003 13:21:12 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Another Simple Question: Formatting

2. Another Simple Question: Formatting

3. Another Simple Question: Formatting

4. A simple questions (format function doesn't exist in VBScript?)

5. simple string formatting question

6. Simple formatting question / SocSec#

7. Help: Simple Format question

8. Simple "how to format data" question

9. Simple Date format question.

10. A simple question on formatting a field

11. Simple Format Question? with Date data

12. Help: Simple Format question

 

 
Powered by phpBB® Forum Software