Making my own number pad

Sohaila Taravati

Registered User.
Local time
Today, 21:50
Joined
Oct 24, 2001
Messages
266
How can I make a number pad to input numbers in my textbox. For example if I push 1 and 3 and . and 9 it would input 13.9 in my textbox. I don't want to calculate anything, just strickly inputing numbers.
Thank you in advance
 
Buuild the requisite buttons, then on the OnClick event for each, concantenate that button's "value" to the text box, in which event you end up with thext, so be sure to convert to the appropriarte date type when used.

Alternatively, each successive button click multiples the textboxes value by a power of 10, you have to keep track of which power, and then adds the button value. Clicking the decimal button indicates your power of 10 is decrementing, etc.
 
I have already done something similar to what you were talking about, but what happens is when I click my button the number is written into the text box but it gets replaced when the other buttons are pushed.
I also don't understand what you mean when you say I end up with text. Can you elaborate!

Thanks again for your quick response :)
 
On the click

e.g. on clicking the 2 command button

Code:
Me.txtYourTextbox = Me.txtYourTextBox & "2"
 

Users who are viewing this thread

Back
Top Bottom