I have an IF statement that validates that only text is in a text box. For reference, here is the code:
Private Sub txtTicker_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
MsgBox ("You entered " & "'" & txtTicker & "'" & ". A Ticker cannot contain numbers.")
Me.txtTicker = Null
Else
Exit Sub
End If
End Sub
If there is an erro , then I need to ignore my BeforeUpdate and AfterUpdate codes. Is there a way to do this from within the IF statement?
Private Sub txtTicker_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
MsgBox ("You entered " & "'" & txtTicker & "'" & ". A Ticker cannot contain numbers.")
Me.txtTicker = Null
Else
Exit Sub
End If
End Sub
If there is an erro , then I need to ignore my BeforeUpdate and AfterUpdate codes. Is there a way to do this from within the IF statement?