[AccessD] Validation Rule and Hyphen

David Emerson newsgrps at dalyn.co.nz
Tue Feb 10 13:05:50 CST 2015


Hi Listers,

 

I have a field for entering in a last name.  I want to restrict the
characters to letters, spaces, apostrophes, and hyphens.

 

In the Validation Rule I have:

 

Is Null Or Not Like "*[!a-z OR "" "" OR ""'"" OR ""-""]*"

 

This works fine except when I enter a hyphen into the field it is rejected.
I can enter letters, spaces, and apostrophes.  All other characters are
rejected.

 

Why are hyphens also rejected?

 

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand

 

 



More information about the AccessD mailing list