Command Button For Number Input

  • Thread starter w2wm via AccessMonster.com
  • Start date
W

w2wm via AccessMonster.com

I am trying to create a system for a touch screen where a user would walk up
to the machine and punch number on the screen. Each number is a command
button and I’m not sure how to make the command button equal that number that
will be placed into that field. I have the on click command set to
fieldname=1 or 2, but that will only input one number into that field not
multiple numbers if the button is pressed. I have the set 0 -9 and can not
get any of them to function the way I want. Please Help.
 
N

Nick 'The database Guy'

Hi w3wm

You must store the buttons pressed in a form level variable.

Good luck,
 
B

Barry Gilbert

Under each button, you need to append the button's number to what is already
in the textbox, the way a calculator works. For example, in the 4 button's
click event, you'd have:
Me.txtDisplay = Me.txtDisplay & "4"

Barry
 
K

Klatuu

I would have a text box on the form that displays the number. Then each time
an button is pushed, concatenate the value of the button to the text box.
I'm sure you will also have an Enter Button where you will then use the value
of the text box to do something with. When it is clicked you can set the
text box value back to "".

If you don't want to display the number, use a module level String varialble.

Example for cmdThree:

Me.txtTheNumber = Me.txtTheNumber & Me.cmdThree
 
W

w2wm via AccessMonster.com

Thank you all! With all of your input I've been able to make this function
well!

Barry said:
Under each button, you need to append the button's number to what is already
in the textbox, the way a calculator works. For example, in the 4 button's
click event, you'd have:
Me.txtDisplay = Me.txtDisplay & "4"

Barry
I am trying to create a system for a touch screen where a user would walk up
to the machine and punch number on the screen. Each number is a command
[quoted text clipped - 3 lines]
multiple numbers if the button is pressed. I have the set 0 -9 and can not
get any of them to function the way I want. Please Help.
 
W

w2wm via AccessMonster.com

Thank you!
I would have a text box on the form that displays the number. Then each time
an button is pushed, concatenate the value of the button to the text box.
I'm sure you will also have an Enter Button where you will then use the value
of the text box to do something with. When it is clicked you can set the
text box value back to "".

If you don't want to display the number, use a module level String varialble.

Example for cmdThree:

Me.txtTheNumber = Me.txtTheNumber & Me.cmdThree
I am trying to create a system for a touch screen where a user would walk up
to the machine and punch number on the screen. Each number is a command
[quoted text clipped - 3 lines]
multiple numbers if the button is pressed. I have the set 0 -9 and can not
get any of them to function the way I want. Please Help.
 
Top