Sep 7, 2001 #1 Fursten Programmer Dec 27, 2000 403 0 0 PT Hi, Can someone tell me how can I lock a text field for input letters. I want only to let the user input numbers(0 -9) Thank you
Hi, Can someone tell me how can I lock a text field for input letters. I want only to let the user input numbers(0 -9) Thank you
Sep 7, 2001 #2 Phathi Programmer Aug 10, 2001 60 0 0 ZA in the keypress proc write Code: If KeyAscii>31 then If isnumeric(chr(KeyAscii)) then if chr(KeyAscii) < 0 or chr(KeyAscii) > 9 then KeyAscii=0 end if End if End if [\code] Ciao Upvote 0 Downvote
in the keypress proc write Code: If KeyAscii>31 then If isnumeric(chr(KeyAscii)) then if chr(KeyAscii) < 0 or chr(KeyAscii) > 9 then KeyAscii=0 end if End if End if [\code] Ciao
Sep 7, 2001 #3 LAndy Programmer Aug 22, 2001 11 0 0 GB or, used in the same place, the slightly less readable If Not (KeyAscii < 32 Or (KeyAscii > 48 And KeyAscii < 57)) Then KeyAscii = 0 End If Andy Upvote 0 Downvote
or, used in the same place, the slightly less readable If Not (KeyAscii < 32 Or (KeyAscii > 48 And KeyAscii < 57)) Then KeyAscii = 0 End If Andy