Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading characters without using LEN()

Status
Not open for further replies.

Wunderbar

Programmer
Aug 14, 2000
6
0
0
CA
is there a basic way of counting the number of characters entered by user.
Say a user enters 1234. The number of characters read is suppose to be 4. I'm looking for a simple solution to this. [sig][/sig]
 
I doubt there is anything simplier then len(). What do you need that len() will not work for you? [sig]<p>David Paulson<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
One might count the keystrokes in the textbox KeyPress event but one would have to add extra code to filter out the backspace and tab keys and all the other keys that don't contribute to the length of a string in a text box.

May I ask what prompts the question?
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top