I created a calculator for a sales program. The code behind each button is:
START OF CODE
Private Sub btn1_Click()
Amount.SetFocus
If Amount > 0 Then
Amount = [Amount] & "1"
Else
Amount = 1
End If
btnEnterItem.Enabled = True
btn1.SetFocus
End Sub
END OF CODE
Amount is a text field. Does anyone know how to stop all the number buttons from working if there are two numbers to the right of the decimal point? Or, to put it another way, how can I programmatically know when this happens so I can program it to stop?
Thank you.
START OF CODE
Private Sub btn1_Click()
Amount.SetFocus
If Amount > 0 Then
Amount = [Amount] & "1"
Else
Amount = 1
End If
btnEnterItem.Enabled = True
btn1.SetFocus
End Sub
END OF CODE
Amount is a text field. Does anyone know how to stop all the number buttons from working if there are two numbers to the right of the decimal point? Or, to put it another way, how can I programmatically know when this happens so I can program it to stop?
Thank you.