postingart
New member
- Local time
- Tomorrow, 02:21
- Joined
- Jun 27, 2021
- Messages
- 17
hello
i want to calculate TOTAL in text field run time . like
TOTAL = ( price x Quantity ) - Discount
i want when press key then calculate run time and only accept numeric value
i want to calculate TOTAL in text field run time . like
TOTAL = ( price x Quantity ) - Discount
i want when press key then calculate run time and only accept numeric value
Private Sub GTotal()
Me.txtGTotal.Value = (Val(Me.txtPrice.Value) * Val(Me.txtQuantity.Value)) - Val(Me.txtDiscount.Value)
End Sub
Private Sub Form_Load()
Me.txtDiscount = 0
Me.txtPrice = 0
Me.txtQuantity = 0
End Sub
Private Sub txtDiscount_Change()
GTotal
End Sub
Private Sub txtPrice_Change()
GTotal
End Sub
Private Sub txtQuantity_Change()
GTotal
End Sub