validation rule

G

Guest

I need to create a validation rule for a field that will hold either a five
digit number or the word "unknown". Is there a way to do this?

Thanks all
 
S

Stefan Hoffmann

hi John,

john said:
I need to create a validation rule for a field that will hold either a five
digit number or the word "unknown". Is there a way to do this?
Create a number field of type Long, allow Nulls. Add as validation rule
"[fieldName] BETWEEN 10000 AND 99999".

Use =Nz([fieldName], "unkown"] in any TextBox, where you like to display
the translation for Null.


mfG
--> stefan <--
 
G

Guest

I'm sorry I dont get it. Am I supposed to type this into the validation
field? and which of hte two statements goes there? Also it appears taht I'm
missing a close parentheses. I'm still quite a novice and sometimes need to
have it spelled our more clearly. Thanks and again, sorry.

Stefan Hoffmann said:
hi John,

john said:
I need to create a validation rule for a field that will hold either a five
digit number or the word "unknown". Is there a way to do this?
Create a number field of type Long, allow Nulls. Add as validation rule
"[fieldName] BETWEEN 10000 AND 99999".

Use =Nz([fieldName], "unkown"] in any TextBox, where you like to display
the translation for Null.


mfG
--> stefan <--
 
S

Stefan Hoffmann

hi John,

john said:
I'm sorry I dont get it. Am I supposed to type this into the validation
field? and which of hte two statements goes there?
Your field:

Field Name: [yourNumber]
Data Type: Number

Set the following in the property editor for your number field:

Default Value: empty
Validation Rule: ([yourNumber] Between 10000 And 99999) Or ([yourNumber]
Is Null)
Validation Text: Enter number between 10000 and 99999.
Required: No



mfG
--> stefan <--
 
G

Guest

Thanks so much for your time and response. Best wishes to you. Today you
are my hero!

Stefan Hoffmann said:
hi John,

john said:
I'm sorry I dont get it. Am I supposed to type this into the validation
field? and which of hte two statements goes there?
Your field:

Field Name: [yourNumber]
Data Type: Number

Set the following in the property editor for your number field:

Default Value: empty
Validation Rule: ([yourNumber] Between 10000 And 99999) Or ([yourNumber]
Is Null)
Validation Text: Enter number between 10000 and 99999.
Required: No



mfG
--> stefan <--
 

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