The following code doesn't allow letters to be entered.
Private Sub txtChildNumberInFamily_KeyPress(KeyAscii As Integer)
If KeyAscii < Asc("0"
Or KeyAscii > Asc("9"
Then KeyAscii = 0
End Sub
However the backspace character also has an ASCII code that will be ignored by this code. That means if I type in a wrong number I can't backspace it
how do I correct this?
Thank you!
Private Sub txtChildNumberInFamily_KeyPress(KeyAscii As Integer)
If KeyAscii < Asc("0"
End Sub
However the backspace character also has an ASCII code that will be ignored by this code. That means if I type in a wrong number I can't backspace it
how do I correct this?
Thank you!