I have the following code to validate that the value entered in a text box is less than the amount in another text box:
Private Sub TxtPaymentAmount_AfterUpdate()
Dim LResponse As Integer
If TxtPaymentAmount.Value > TxtPOTotal.Value Then
LResponse = MsgBox("Payment Amount is greater then PO Invoice Amount", vbOKOnly, "Input Error")
TxtPaymentAmount.Value = 0
TxtPaymentAmount.SetFocus
End If
End Sub
I am assigning the value in TxtPOTotal using the following code:
Private Sub ComboPONumber_AfterUpdate()
Let TxtPOTotal.Value = Format(ComboPONumber.Column(3), "0,000.00")
End Sub
Apparently the value in fisrt text box is a stored as value but the second text box is stored as a string, so the condition never a applies. Any ideas?
:banghead:
Private Sub TxtPaymentAmount_AfterUpdate()
Dim LResponse As Integer
If TxtPaymentAmount.Value > TxtPOTotal.Value Then
LResponse = MsgBox("Payment Amount is greater then PO Invoice Amount", vbOKOnly, "Input Error")
TxtPaymentAmount.Value = 0
TxtPaymentAmount.SetFocus
End If
End Sub
I am assigning the value in TxtPOTotal using the following code:
Private Sub ComboPONumber_AfterUpdate()
Let TxtPOTotal.Value = Format(ComboPONumber.Column(3), "0,000.00")
End Sub
Apparently the value in fisrt text box is a stored as value but the second text box is stored as a string, so the condition never a applies. Any ideas?
:banghead: