Validation Rule

L

l.smith

I need to create a validation rule with the following
parameters. It is a text field with numeric characters
and it is required to be 9 characters long. Here is what
I think it should look like, but it does not work.

Like "01???????"-"15???????"or"21???????"-
"32???????"or"61???????"-"72???????"

Any ideas please?
 
T

Tim Ferguson

Here is what
I think it should look like, but it does not work.

Like "01???????"-"15???????"or"21???????"-
"32???????"or"61???????"-"72???????"

VAL(MyField) BETWEEN 100000000 AND 159999999
OR VAL(MyField) BETWEEN 210000000 AND 329999999
OR VAL(MyField) BETWEEN 610000000 AND 729999999

Note: if any of the chars are non-digit, then the remaining number won't be
big enough for any of the ranges.

Note 2: you might want to catch the error like 123456789ABC, which will
pass this test: either set the field length to 9, or add a constraint like

LEN(MyField)=9 AND
( VAL(MyField) BETWEEN 100000000 etc. etc.


Hope that helps

Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top