Automatic Tabbing Question

MrsGorilla

Rat Race Participant
Local time
Yesterday, 23:08
Joined
May 6, 2003
Messages
1,745
Hello all,

A quick search yielded no results, so here goes. What is the easiest way to automatically tab to the next field once a user has entered the maximum number of digits in the current field?

For example, I have a form with the 3-digit area code in one field, followed by the 7-digit phone number (this was set up originally by someone else, I don't know why the area code and phone number are split up). Since these fields will always be the same length, what I'm wanting to do is automatically set focus to the next field once the user has entered 3 numbers in the area code field, without their having to hit the 'Tab' key. Any thoughts?

Thanks in advance...
 
You can check the Len() of the .Text property in the OnChange event and do a Me.YourNextControlName.SetFocus when you have enough characters. You can always put fields back together but separating them can sometimes be difficult.
 
Could you len() in the OnChange event
 
RuralGuy said:
You can check the Len() of the .Text property in the OnChange event and do a Me.YourNextControlName.SetFocus when you have enough characters. You can always put fields back together but separating them can sometimes be difficult.

Yeah, that :p
 
Thanks, guys. I'm going to give it a whirl to see how it works. :)
 
Nope. Far too mountainous for our area. Our "mountains" are really more like hills. :(
 
Boy does it ever! I'm stuck looking at this kind of view every day. Oh well, I guess someone has to do it. ;) :D
 
Last edited:

Users who are viewing this thread

Back
Top Bottom