A family of Microsoft relational database management systems designed for ease of use.
Put the following in the control's KeyPress event procedure:
Select Case KeyAscii
Case 48 To 57
' numeric character, do nothing
Case 8
' backspace, do nothing
Case Else
' suppress character entered
KeyAscii = 0
End Select
I you want to allow other special characters, such as a comma as the thousands separator or arithmetical symbols, then you'd need to augment the code accordingly. To find the ASCII value for a character call the Asc function in the immediate window, e.g. to find the ASCII value for the comma character:
? Asc(",")
44