On change event of a field

M

Markus

Hallo

Is it possible to have a delay in a on change event?

What I am trying to do is I have a QTY field in a form and when a person
enters a QTY it should to a new field so what I do is on the on change event
I use the goto command and that works fine but I have the limit that I can
only enter on character in the QTY field so I would like a little delay of 1
or 2 seconds before it goes to the next field with to goto command is
something like this possible.

Regards
Markus
 
K

Klatuu

You don't need a delay, what you need to do is move the code from the Change
event to the After Update event.
 
M

Markus

That does not work as the after update event needs to be confirmed with enter
then only it will move to the field i want to

Markus
 
K

Klatuu

When do you want it to move?

Markus said:
That does not work as the after update event needs to be confirmed with enter
then only it will move to the field i want to

Markus
 
M

Markus

On the On Change event I have the code DoCmd.GoToControl "SlotNo1" but this
command only allows me to type in one character then it goes to the
GotoControl but what I need it that there is a little delay of 1 to 2 seconds
before it runs the gotocontrole so its possible to enter 2 character as its a
QTY field.

Markus
 
R

Rick Brandt

Markus said:
On the On Change event I have the code DoCmd.GoToControl "SlotNo1"
but this command only allows me to type in one character then it goes
to the GotoControl but what I need it that there is a little delay of
1 to 2 seconds before it runs the gotocontrole so its possible to
enter 2 character as its a QTY field.

Get rid of your code, apply a two digit InputMask and then turn on the AutoTab
property for the control. As soon as two digits are entered Access will
automatically "tab" to the next control.
 
K

Klatuu

Good solution, Rick.

Rick Brandt said:
Get rid of your code, apply a two digit InputMask and then turn on the AutoTab
property for the control. As soon as two digits are entered Access will
automatically "tab" to the next control.
 
Top