Chr(Key) - Numeric Keypad
Posted on 2006-11-21
I have a string of allowed characters ... i.e. "0123456789ABCD"
depending on the characters in the string depends on what the user is allowed to enter into the text box.
If Len(AcceptCharacters) > 0 Then
If InStr(1, AcceptCharacters, Chr(Key)) = 0 Then
FilterKeypress = 0
however this does not work for the numeric key pad as the characters being returned bear no resemblemence to 0123456789 (i.e I get abcd etc). How can I do this ... I know you can do isnumeric ... but I need to be allow the user to just pass "345YH" etc, so I really need to be able to get the proper character being entered, i.e. 0123456789