Edit Textbox using KeyPress vba code in Access
Why don't you simply use a Spin Button instead of a
TextBox? It does exactly what you need to do.
-----Original Message-----
Hello,
I am trying to edit a textbox which contains a number.
When focus is
on the textbox, and a user press the "arrow up", I would
like the
textbox value to increase of 100, and at the opposite
when the user
press "arrow down", I would like this value to decrease
by 100.
For the moment I have done that using the "keypress"
event, but I have
a problem, as this event reacts to any key of the
keyboard.
So I would need whether another idea to proceed or a way
to qualify
the key which is being pressed as the "arrow up"
or "down", then I
could use a conditional phrase.
Thank you for your help.
.
|