Not that there's anything wrong with that but for future reference note that the following would also work:If you weren't going to use an Else block then that might be preferable. As you are using an Else block neither is any better than the other.VB Code:
If Not Me.ccTextBox.Enabled OrElse Me.ValidateNonEmptyString(Me.ccTextBox.Text) Then Me.ErrorProvider.SetError(Me.ccTextBox, Nothing) Else Me.ErrorProvider.SetError(Me.ccTextBox, ERR_MSG) errCount += 1 End If




Reply With Quote