button function called by a keystroke

wizcow

Registered User.
Local time
Today, 15:25
Joined
Sep 22, 2001
Messages
236
I have ten buttons on a form.
They are numbered, 0 to 9 and they enter that number into a textbox.

Is there a way that the user can have the option to press a number key on the keyboard, or click the number button?

eg. Click the '9 button' to enter 9 into the textbox, or
press the number '9' key on the keyboard, to enter 9 into the textbox.

[This message has been edited by wizcow (edited 01-07-2002).]
 
Hey Wizcow,

If you already have command buttons with 0-9 as their captions then I would think you could go into each command buttons properties and under the first tab is the caption property. Try adding an "&" in front of each buttons number.

ie change 1 to &1; 2 to &2.

See if that does what your looking for.

HTH
Badokie
 
Oh yea, one more thing. This should allow the user to hold the Alt key down and then push the number they want and it should fire the code behind the command button.
 

Users who are viewing this thread

Back
Top Bottom