G
Gazza
Can someone tell me if it is possible to limit the keys that can be entered
into a textbox.
By this i mean i have a textbox at the end of a form and i want the user to
only be able to enter either Y, N or d.
At the moment i can enter anything into the textbox and it will save the
record but i only want the record to be added if the Y key is pressed. The N
and D keys are for other functions and they work to but i can`t figure out
how to stop the record from being added if i press say the K key or if i just
hit the enter key with nothing in the textbox atall.i have tried the code in
the afterupdate, beforeupdate, onkeydown, onkeyup, on exit and lost focus
events all with different results (and problems).
Any help will be much appreciated
Thanks
Gareth
into a textbox.
By this i mean i have a textbox at the end of a form and i want the user to
only be able to enter either Y, N or d.
At the moment i can enter anything into the textbox and it will save the
record but i only want the record to be added if the Y key is pressed. The N
and D keys are for other functions and they work to but i can`t figure out
how to stop the record from being added if i press say the K key or if i just
hit the enter key with nothing in the textbox atall.i have tried the code in
the afterupdate, beforeupdate, onkeydown, onkeyup, on exit and lost focus
events all with different results (and problems).
Any help will be much appreciated
Thanks
Gareth