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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move from textbox to textbox using OnChange

Status
Not open for further replies.

RClarkeJr

Programmer
Nov 10, 2004
20
US
I have a form which has three fields for date. Month (2 Char), Day (2 Char), and Year (4 Char). When a user enters the second character, I want the focus to change to the next texbox and so on. I am unable to use the OnChange.

Does anyone have any ideas how to approach this? I have exhausted all my opinions. Thanks in advance.
 
RClarkeJr,

I'm thinking that you're looking for a Visual Basic solution, and not a VBScript solution, correct ??

-SWarrior
 
I have a a VB solution, but I need to incorporate the same solution in VBScript. I have seen some sites where the cursor moves once you have entered the information.

Any Ideas?
 
I should give myself a star for this. I found javascript which works well with vbscript.


Once I embedded the script, I added the following in the INPUT section of the textbox onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3".

And it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top