By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,983 Members | 2,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,983 IT Pros & Developers. It's quick & easy.

touch screen

P: n/a
hi all !

i have a database working on a touch screen.
on one of the forms i would like to place some buttons with all
numbers so you can enter a numeric value in without using the
keyboard. ie. "1","2","3","4","5","6","7","8","9","0"
how can i set up buttons on the form so that when you touch the button
on the touch screen it enters that number into the data field ?
im not sure if this is possible or not with Access ??
any ideas would be appreciated .... thanks!

brino

Mar 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mar 20, 9:25 am, "brino" <bdsolutions2...@yahoo.com.auwrote:
hi all !

i have a database working on a touch screen.
on one of the forms i would like to place some buttons with all
numbers so you can enter a numeric value in without using the
keyboard. ie. "1","2","3","4","5","6","7","8","9","0"
how can i set up buttons on the form so that when you touch the button
on the touch screen it enters that number into the data field ?
im not sure if this is possible or not with Access ??
any ideas would be appreciated .... thanks!

brino
Hi Brino,

Create the command buttons and name them something like cmd1, cmd2
etc.

Create a text box called something like myTextBox.

In the "On Click" event of cmd1, put the following code:

Private Sub cmd1_Click()

Dim txtVal As String
Dim newTxtVal As String

If IsNull(Me.myTextBox.Value) Then
Me.myTextBox.Value = 1
Else
txtVal= Me.myTextBox.Value
newTxtVal = winVal & 1
Me.myTextBox.Value = newTxtVal
End If

End Sub
Continue this for the rest of the buttons, changing the number "1" in
the code to "2" and so on for all the buttons.

This just concatenates the number of the button you have just clicked
to the end of the string in the text box.

Hope this helps a bit,

David

Mar 20 '07 #2

P: n/a
Sorry,

This line:

newTxtVal = winVal & 1

should read

newTxtVal = txtVal & 1
Mar 20 '07 #3

P: n/a
On Mar 20, 9:26 pm, "Daveo" <writetoda...@gmail.comwrote:
Sorry,

This line:

newTxtVal = winVal & 1

should read

newTxtVal = txtVal & 1
thanks heaps daveo
thats great !!!

Mar 20 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.