I want to disallow special characters

Djblois

Registered User.
Local time
Today, 14:32
Joined
Jan 26, 2009
Messages
598
I have a field that people type Order numbers in and sometimes they use a dash and sometimes they do not. This can cause problems because the same order can get entered twice (once with and once without a dash) How do I prevent any special characters from being entered in the field. I would prefer to stop it on key press then before update.
 
If you look in VBA help at KeyPress, you should find the appropriate code. You'd use a Select/Case to allow your chosen characters and reject any others (KeyAscii = 0).
 

Users who are viewing this thread

Back
Top Bottom