Auto Tabbing upon entry

G

Guest

I have a form that has several fields, but 4 of the fields require only a 2
digit character before moving to the next field. Is there away to
automatically move to the next field upon entering the two digits required.
Bascially move without having to hit the tab key between entries.

Thanks in advance.
 
R

Rick Brandt

Sondra said:
I have a form that has several fields, but 4 of the fields require
only a 2 digit character before moving to the next field. Is there
away to automatically move to the next field upon entering the two
digits required. Bascially move without having to hit the tab key
between entries.

Thanks in advance.

I "think" AutoTab only works with a numeric field if you have an InputMask
on it. Otherwise Access has no way of knowing you have hit the maximum
number of characters.
 
A

Alex White MCDBA MCSE

You could monitor the key up event for the textbox

Private Sub myDate_KeyUp(KeyCode As Integer, Shift As Integer)
If Len(Trim(myDate.Text)) > 1 Then
Me.Text1.SetFocus ' goto the control you want
End If

End Sub
 
G

Guest

The Auto Tab property works for any characters entered, but does require an
InputMask with the correct length defined.
 
R

Rick Brandt

Klatuu said:
The Auto Tab property works for any characters entered, but does
require an InputMask with the correct length defined.

Yes, but how do you define the "correct length" if the field the control is
bound to is not text?
 
G

Guest

See the InputMask property info in Access Help.

For two digits required 00
For two digits not required 99
 
R

Rick Brandt

Klatuu said:
See the InputMask property info in Access Help.

For two digits required 00
For two digits not required 99

I believe that is what I originally stated; that if the field was numeric
the OP would have to add an InputMask to make AutoTab work and you responded
by saying an InputMask was not required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top