*UPDATED*: NEW PEOBLEM (Validating a Surname)
I need to validate a surname field which obviously can only consist of letters and occasionally spaces and/or hyphens. (i.e. van Driel or Johnson-Crooks)
I managed to create a validation rule which would allow me to have space in the surname field:
but when I tried to allow hyphens into the field - I used these codes - but none of them worked:
Please can smeone help me.
James
I need to validate a surname field which obviously can only consist of letters and occasionally spaces and/or hyphens. (i.e. van Driel or Johnson-Crooks)
I managed to create a validation rule which would allow me to have space in the surname field:
Code:
Is Null Or Not Like "*[!((a-z) or (\ ))]*"
but when I tried to allow hyphens into the field - I used these codes - but none of them worked:
Code:
Is Null Or Not Like "*[!((a-z) or (\ ) or (-))]*"
Is Null Or Not Like "*[!(a-z)]*" Or Not Like (" ") Or Not Like ("-")
Is Null Or Not Like "*[!(a-z)]*" Or Not Like "*[!(\ )]*" Or Not Like "*[!(\-)]*"
Is Null Or Not Like "*[!(a-z)]*" Or Like "*[!(\ )]*" Or Like "*[!(\-)]*"
Is Null Or Not Like "*[!(a-z)]*" Or Not Like "*[(\ )]*" Or Not Like "*[(\-)]*"
Is Null or Not Like "*[!(a-z)]*" or (in ("-","\ "))
Is Null Or Not Like "*[!(a-z)]*" And (Not In ("*[0-9]*"))
Is Null Or Not Like "*[!(a-z)]*" And (Not In ("*[0-9]*")) And (In ("-"," "))
Is Null Or Not Like "*[!(a-z)]*" Or Like (\ ) Or (-)
Please can smeone help me.
James
Last edited: