A family of Microsoft relational database management systems designed for ease of use.
Thank you!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
On one of my forms two boxes are giving me error message of "Enter value of 0-10 or N/A" even when I type a numebr between 0 and 10. The form is linked to a Table and I get the same error message there. I checked the field properties of the table and it says:
Under General:
Field Size: Long Integer
Format: General Number
Decimal Places: Auto
Input Mask:
Caption: # of Children
Default Value: 0
Validation Rule: <=10
Validation Text: Enter a number between 0 and 100
Required: No
Indexed: No
Text Align: General
Under Lookup
Display Control: Text Box
Thank you for your help!
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Thank you!
As the column can apparently accept a value of 'N/A' it must be of text data type. Consequently any comparison of values is on a text basis, so a value of "2" for instance is not less than a value of "10" you can see this in the immediate window:
? "2"<"10"
False
You can make a numerical comparison by calling the Val function:
? Val("2")<10
True
The validation text you are getting is not that specified in the table definition, so I suspect the control in the form has been given a different validation text. You'll need to amend both ValidationRule properties therefore to this:
(Val([NameOfColumnGoesHere])>=0 And Val([NameOfColumnGoesHere])<=10) Or [NameOfColumnGoesHere]="N/A"
"Enter value of 0-10 or N/A"
What is the error message?