Avatar of thandel
thandel

asked on 

Trim a validation rule?

I have a form that has an email field.  I have a validation rule of:

Is Null Or ((Like "*?@?*.?*") And (Not Like "*[ ,;]*"))

to help ensure the email is entered fairly accurately.  For the most part it works great.  However if a user pastes text into the field that has a space at the start of the text the validation rule fails.

Is there a way to incorporate trim into the validation rule or perhaps run after update VBA code to validate the form and trim it instead?
Microsoft AccessVBA

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon