Go to specific field

R

Roger Bell

I have a form design that when the user loads this form, the cursor appears
in a Number field. When a number is typed in and Enter is pressed, the
cursor moves to a value field. When the value is typed in and Enter pressed,
I would like the cursor to return to the Number field again for the process
to be repeated.
I have tried an After Update Event procedure without success.
I would appreciate any help
Thank You
 
B

banem2

I have a form design that when the user loads this form, the cursor appears
in a Number field.  When a number is typed in and Enter is pressed, the
cursor moves to a value field.  When the value is typed in and Enter pressed,
I would like the cursor to return to the Number field again for the process
to be repeated.
I have tried an After Update Event procedure without success.
I would appreciate any help
Thank You

You need to determine if the user input is numeric type, like this:

If IsNumeric(myField) and Len(myField) > 0 then
txtNumberField.SetFocus
Else
txtValueField.SetFocus
End If

Regards,
Branislav Mihaljev, Microsoft Access MVP
 
L

Linq Adams via AccessMonster.com

Private Sub SecondField_Exit(Cancel As Integer)
Me.FirstField.SetFocus
End Sub

Branislav Mihaljev,

One would think that with MVP after your name, you would be able to read a
simple question and reply appropriately! Your reply has absolutely nothing to
do with the OP's question.
 
Top