Time Calc

SteveE

Registered User.
Local time
Today, 05:26
Joined
Dec 6, 2002
Messages
221
I know this will be a simple soluation for most of you but any help for me would be appricated.

How do I prevent spaces being entered in a feild withot having to speicify the exact validation rule.


thanks
 
Use the KeyDown event to test for a space: ASCII code 32
 
thanks for that but what exactly do you mean

Steve
 
In your On KeyDown event of the textbox (control) add:

If KeyCode = 32 Then KeyCode = 0

(taken from Access XP might need some tweeking in other versions)

This way if a space is entered (32) its set to 0 (no key pressed) Thus not allowing for any spaces in your field.

Regards
 

Users who are viewing this thread

Back
Top Bottom