Keypad

M

mikejs2000

Hi,
I am currently playing with Epos systems.

Most things I have handled with no problem but one bit I am finding
difficult to work out. this is the keypad for entering tendered amounts. ok
here's an explination.

I have a grid of 11 keys each numbered from 0 to 9 with a key for 00
I also have a text box named tendered_amount, now when I press a number I
want the tendered_amount box to fill from the right and to build uo the
amount. Ok, I have this happening where I have the problem is the decimal
place all the ways I have tried have displayed everything I enter in front of
the decimal place. It would be nice is the display also kept the leading
zeros also (I will never have a tendered amount bigger than 999.99.

If anyone could point me to something that I can look at to see how it was
done I would be greatfull.

Keep on Coding

Mike J. Soames
 
R

Rick B

This is an Access forms coding newsgroup. Your question does not seem to be
related to Microsoft Access (the database application).
 
M

mikejs2000

The complete system is written in VBA and held in an Access 2002 database. So
I am in the correct place, as it is a question asking for advice on fow to
code a form.

Thanks

Mike J. Soames
 
M

Marshall Barton

mikejs2000 said:
I am currently playing with Epos systems.

Most things I have handled with no problem but one bit I am finding
difficult to work out. this is the keypad for entering tendered amounts. ok
here's an explination.

I have a grid of 11 keys each numbered from 0 to 9 with a key for 00
I also have a text box named tendered_amount, now when I press a number I
want the tendered_amount box to fill from the right and to build uo the
amount. Ok, I have this happening where I have the problem is the decimal
place all the ways I have tried have displayed everything I enter in front of
the decimal place. It would be nice is the display also kept the leading
zeros also (I will never have a tendered amount bigger than 999.99.


You can use the text box's Format property to diosplay as
many leading zeros as you want. Just provide a custom
format sub as
000.00

To set the decimal point, I think you can use the text box's
AfterUpdate event to adjust the entered value:

If Me.thetextbox Like "*.*" Then
' decimal point already there, leave it alone
Else
Me.thetextbox = Me.thetextbox / 100
End If
 
M

mikejs2000

Thank you very much for your advice, I now have a working key pad.

Keep on Coding
Mike J. Soames
 
Top