Disable Spaces

mr moe

Registered User.
Local time
Today, 07:52
Joined
Jul 24, 2003
Messages
332
Hi, I have a text box in a from for data entry, how do I disable a space. For example I don't want the user to have a space between charaters or before and after a charater. Thanks.
 
In the text box's KEY PRESS event put this:

If KeyAscii = 32 Then KeyAscii = 0
 
open form1 in the exampe and try to input a name with a space
 

Attachments

open form1 in the exampe and try to input a name with a space

Not real beneficial as it lets you type a space, or spaces, and then lets you know AFTER the fact. My code will keep you from typing a space at all.
 
Yeah your way is better. Just Rub it in BOB!:D
 
Yeah your way is better. Just Rub it in BOB!:D

Gotta take 'em while I can get 'em Keith. :) You are leaving me fewer things to correct and I'm starting to feel not needed :D
 

Users who are viewing this thread

Back
Top Bottom