On Wednesday, January 30, 2002, at 01:45 PM, Paul wrote:
There might be a "better" way to do this...
But what I have done is to add the following to the EditField's KeyDown
event:
if Asc(Key)>47 and Asc(Key)<58 then
return false
else
return true
end if
This only allows zero through 9 to actually make it into the box.
As written, this will prevent the user from using the Delete and Tab
keys. So instead you might use
Return NOT ((Asc(Key)>47 and Asc(Key)<58) or Asc(key) = 8 or Asc(key) =
9)
Charles Yeomans
|