I use this code to limit input to digits for a text field
Code: Select all
on keyDown pKey
put cr & "1" & cr & "2" & cr & "3" & cr & "4" & cr & "5" & cr & "6" & cr & "7" & cr & "8" & cr & "9" & cr & "0" into tAllowed
if pKey is not in tAllowed then
answer "Entries can only contian NUMBERS" with "OK"
else
pass keyDown
end if
end keyDown
Thanks for any suggestions or advice,
TJ.