Remove spaces within a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top