Remove spaces within a string

S

Seth

I have a number of bound and unbound text boxes on the various forms in my
database. And I want to prevent the user entering spaces (not just leading
and trailing).

Is there a function I can use to detect spaces within a string and remove
them?


Thanks,
Seth
 
A

Allen Browne

Use the KeyPress event of the control (or the Form to affect all controls).

If the KeyCode = 32, destroy the keystroke by setting it to zero.

For existing data in Access 2000 and later, use the Replace() function.
 
Top