Question
June 24, 2008 at 12:41 PM
bossann

“Automatic” Set Focus based on field length

by bossann . Updated 18 years, 2 months ago

I have a user who finds it inconvenient to or to get to the next field on a form. The first field must be 12 characters long. I have tried:

Private Sub txtEmpNum_Change()
If Len(Me!txtEmpNum) = 12 Then Me!txtDeviceID.SetFocus
End Sub

But the field length doesn’t seem to be recalculated after each keystroke. So I tried tying it to the “On Key Press” event?that didn’t seem to change anything. I’m stymied. Any help would be appreciated.

TIA,
Roxane

This discussion is locked

All Comments