PDA

View Full Version : Solved: Validation rule



Jurodj
08-28-2007, 06:07 PM
I have a field named Customer_ID
Text data type
length = 5
and input mask: >LL999

How can I prevent that someone enter 000 in the last 3 digits. For instance you could type PE000 and it will be stored in a record but I do not want a client begining with 000.

I tried to insert a validation rule as follows:

Val(Right([CUSTOMER_ID],1) > 0

but it does not work.
What can I do?.
:dunno

geekgirlau
08-28-2007, 08:21 PM
It worked for me with one minor change:

Val(Right([CUSTOMER_ID],3) > 0

Jurodj
08-29-2007, 06:13 AM
Solved: I made the change you suggested and it was giving me an error even with the last 3 digits > 0.

I tried this and worked:
(Right([Cliente_ID],3))<>"000"

Thank you very much.
Jurodj
:friends: