validation of a field

  • Thread starter Thread starter ADKO
  • Start date Start date
A

ADKO

Guest
Hello,
I am having trouble with validating a field in my database that holds ISBNs. The problem that I am havng is that ISBNs are 13 characters long they always include 3 hyphens and 10 number digits. However there are many ways that an ISBN is arranged (I will use "x" to represent a number digit) such as:
x-xxxx-xxxx-x
x-xx-xxxxxx-x
x-xxxxxxx-x-x
x-xxxxxx-xx-x
x-xxx-xxxx-xx
Is there an input mask and validation rule that can help me? Please help I'm desperate!
ADKO
 
I have attached a file to show you what the table should look like.

Basically, set your field size to 13.

For Validation Rule you should put: Like "?-????-????-?" Or Like "?-??-??????-?" Or Like

and so on in any of the variations that you have listed below, just replacing the X's with ?'s.

For the Validation Text, you may want to put something like ISBN must be 13 characters including hyphens.

I don't know if there is an easier way, but this seems to work....
 

Attachments

  • fieldvalidation.jpg
    fieldvalidation.jpg
    43.8 KB · Views: 170

Users who are viewing this thread

Back
Top Bottom