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