force advance to next field (1 Viewer)

mahai1ey

New member
Local time
Today, 06:34
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
 

DCrake

Remembered
Local time
Today, 14:34
Joined
Jun 8, 2005
Messages
8,632
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.
 

mahai1ey

New member
Local time
Today, 06:34
Joined
Apr 27, 2011
Messages
4
Worked like a charm.... awesome..thanks!!!!
 

missinglinq

AWF VIP
Local time
Today, 09:34
Joined
Jun 20, 2003
Messages
6,423
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

Top Bottom