Numeric Key Pad for touch screen

C

CJA

Hi,

I need to create something like the "Date Picker", but for numbers.
My application will be used in a touch screen notebook. I need this: when a
user touch the price field, open a small numeric keypad where the user can
press the numbers to indicate the price.
With this function, notebook keyboard will not be used.

Thanks

CJA
 
K

Klatuu

Create a form with all the command buttons you need, including a decimal
place button, and a text box to show the value entered, and, of course, a
clear button.
Then in the click event of each of the buttons, do what is neccesary. For
example the "3" command button code would look something like this in the
Click event:

Me.txtPrice = Me.txtPrice & "3"

The Clear button would be
Me.txtPrice = Null
 
A

Al Campagna

CJA,
I can't speak as to how your touch screen would need to be programmed to
enter each digit, but perhaps if I explain how it could be done with a
mouse, you could interpolate that to your touch screen.
Use text controls to build your 10 digits, a Decimal, an Enter, and a
Clear. (Buttons would be OK too... both have an ONClick event.)
Create an unbound text control called TempPrice
On each OnClick event of any digit buttons... (example 18.65)... you
would concatenate each value to TempPrice.

First the 1 button...
Private Sub One_Click()
TempPrice = TempPrice & "1"
End Sub
Then you click the 8 button...
Private Sub Eight_Click()
TempPrice = TempPrice & "8"
End Sub
Then the "."
Private Sub Decimal_Click()
TempPrice = TempPrice & "."
End Sub
And so on until the number is complete... then hit the keypad Enter
button.
Private Sub Eight_Click()
YourRealPriceField = Val(TempPrice)
End Sub

The Clear button would... TempPrice = "", and you should do that before
and after keypad entry.

Does that help at all?
Actually, an argument could be made that if the user is already using
the mouse for other entry on the form, it would be more efficient to use the
mouse to enter the Price, rather than switch to screen, and then back to the
mouse to continue.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
F

foo.sg

I can do this successfully in a text control. How can I send the value to a
Combo box at the OnClick Event?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top