I am using this componenet to flag blank textboxes etc in my system -
Now i think my code is correct,and i have added the conmponent to the form, it catches the error fine. My problem is that i cannot get the icon to disappear once it is displayed (when i go and fill the txtCarNo and press submit again)
Now i think my code is correct,and i have added the conmponent to the form, it catches the error fine. My problem is that i cannot get the icon to disappear once it is displayed (when i go and fill the txtCarNo and press submit again)
Code:
Public Sub validateForm2()
Dim CarNoErrorProvider As New System.Windows.Forms.ErrorProvider
If txtCarNo.Text = "" Then
CarNoErrorProvider.SetError(txtCarNo, "Cannot leave textbox blank")
Else
CarNoErrorProvider.SetError(txtCarNo, "")
End If
Dim SupplierErrorProvider As New System.Windows.Forms.ErrorProvider
If cboSupplier.SelectedValue = (0) Then
SupplierErrorProvider.SetError(cboSupplier, "Cannot leave textbox blank")
Else
SupplierErrorProvider.SetError(cboSupplier, "")
End If
End Sub