I would like to add the allow backspace in addition to 0-9 integers below. I believe the Ascii code is 13 but i can’t get it to work with the following.
Private Sub txtSSN_KeyPress(KeyAscii As Integer)
If Chr(KeyAscii) 9 or Chr(KeyAscii)=13 Then
txtSSN.Text = “”
KeyAscii = 0
MsgBox “You can’t enter letters in this field.”, , “Health Quest Visit Arhive”
End If
End Sub
Help! Thank you.