jlathem
Technical User
- Jul 25, 2010
- 27
I am rather new to MS Access Forms and need Syntax for an issue I am having in a form.
I need to trim leading and trailing spaces from text coming from a control box called “Comment”. I don’t want someone to be able to just insert blank spaces and call it a comment!
Normally in my web developing I use:
Trim(#Form.Comment#)
[#whatever# is a ColdFusion Variable] in my CFM pages. But I am trying to use Trim in a MS Access 2003 / Table Control.
I found several forum references to using this syntax in the text box’s Control Source:
=Trim([Comment])
But I get an #error message in the Comment text box.
Another reference said to use the code above but change the Control Name to CommentTrim. That got rid of the error message but would not allow me to enter anything in the box.
Does anyone have any suggestions?
Thanks!