force advance to next field

mahai1ey

New member
Local time
Today, 13:01
Joined
Apr 27, 2011
Messages
4
Good day. I have a data entry form with a field for job # which is min/max of nine (9) characters. When users get to this field and type in the 9 characters I would like the form to advance to the next field. I don't have enough experience with Access to know if this is possible. Any help is much appreciated.
Mary Ann
 
Two things you need to do

step 1

Create an input mask for your textbox

Step 2

Set the autotab property of the textbox to Yes/True

This means that as soon as the 9th character is pressed in the input string the cursor will go to the next field in the form.
 
Worked like a charm.... awesome..thanks!!!!
 
I hate Input Masks! If you click into the middle of the field with the mouse you have to backtrack to the beginning! And if you click into the middle and just start typing it's even worse!

So I just use the this bit of code in the OnChange event:
Code:
Private Sub TargetControl_Change()
 If Len(Me.TargetControl.Text) = 9 Then
  Me.NextControl.SetFocus
 End If
End Sub

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom