Yet another keypress/input mask question for the forum

BobJones

Registered User.
Local time
Today, 05:59
Joined
Jun 13, 2006
Messages
42
Yea yea I know, another one...
But the way I see is that I haven't asked them all so its ok... :p

Right basically, I only want to allow input of Y N or P into a text field. I thought it would be best to do it with an onkeypress event as I know of no way to block certain characters in a text field with an input mask.. this is what I came up with but it doesnt seem to work...

If Not KeyPress=78 Or Not KeyPress=80 Or Not KeyPress=89 Then KeyPress = 0

Any ideas?
 
Make this field a combobox with list of values and set LimitToList = Yes in properties
 

Users who are viewing this thread

Back
Top Bottom