Number Keyboard on Screen with a touch screen

S

Simon

I have a Despatch System with a touch screen monitor

I have a two fiels Order Weight and Number of Parcels

I have made a number keyboard onscrren with the following buttons
1,2,3,4,5,6,7,8,9,0


Is there a way then the cursor is on the field OrderWeight and then i
click the the number buttons on scrren it enteres the value then when
i move the focus to Number of PArcels i can then use the same number
pad again

Thanks

SImon
 
D

Douglas J. Steele

While I haven't tested, you should be able to do something like create a
form-level variable that tells you whether you're trying to enter values in
OrderWeight or in NumberOfParcels. In the Click event of each of the ten
number buttons, check the value of Screen.PreviousControl.Name. If it's
either OrderWeight or NumberOfParcels, reset the form-level variable, then
use that value to determine where to put the value.

Dim mstrWhichControl As String

Private Sub cmdOne_Click()

Select Case Screen.PreviousControl.Name
Case "OrderWeight", "NumberOfParcels"
mstrWhichControl = Screen.PreviousControl.Name
Case Else
End Select

Me.Controls(mstrWhichControl) = _
Me.Controls(mstrWhichControl) + 1

End Sub

Private Sub cmdTwo_Click()

Select Case Screen.PreviousControl.Name
Case "OrderWeight", "NumberOfParcels"
mstrWhichControl = Screen.PreviousControl.Name
Case Else
End Select

Me.Controls(mstrWhichControl) = _
Me.Controls(mstrWhichControl) + 2

End Sub

etc.
 
S

sluv

Simon said:
I have a Despatch System with a touch screen monitor

I have a two fiels Order Weight and Number of Parcels

I have made a number keyboard onscrren with the following buttons
1,2,3,4,5,6,7,8,9,0


Is there a way then the cursor is on the field OrderWeight and then i
click the the number buttons on scrren it enteres the value then when
i move the focus to Number of PArcels i can then use the same number
pad again

Thanks

SImon
 
Top