touch screen

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • brino

    #1

    touch screen

    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

  • Daveo

    #2
    Re: touch screen

    On Mar 20, 9:25 am, "brino" <bdsolutions2.. .@yahoo.com.auw rote:
    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.myTex tBox.Value) Then
    Me.myTextBox.Va lue = 1
    Else
    txtVal= Me.myTextBox.Va lue
    newTxtVal = winVal & 1
    Me.myTextBox.Va lue = 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

    Comment

    • Daveo

      #3
      Re: touch screen

      Sorry,

      This line:

      newTxtVal = winVal & 1

      should read

      newTxtVal = txtVal & 1


      Comment

      • brino

        #4
        Re: touch screen

        On Mar 20, 9:26 pm, "Daveo" <writetoda...@g mail.comwrote:
        Sorry,
        >
        This line:
        >
        newTxtVal = winVal & 1
        >
        should read
        >
        newTxtVal = txtVal & 1
        thanks heaps daveo
        thats great !!!

        Comment

        Working...