The code you posted checks txtAccount name in both subroutines, ignoring txtIssuingBank. Apart from that, this code looks ok to me.
VB Code:
Private Sub txtAccountName_Validating(ByVal sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) Handles _ txtAccountName.Validating If IsNumeric(txtAccountName.Text) Then ErrorProvider1.SetError(txtAccountName, "Not a numeric value.") Else ' Clear the error. ErrorProvider1.SetError(txtAccountName, "") End If End Sub Private Sub txtIssuingBank_Validating(ByVal sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) Handles _ txtIssuingBank.Validating If IsNumeric([b]txtAccountName.Text[/b]) Then ErrorProvider1.SetError(txtIssuingBank, "Not a numeric value.") Else ' Clear the error. ErrorProvider1.SetError(txtIssuingBank, "") End If




Reply With Quote