0

In the expression IIF[SSN]=50,99,[SSN]) when I enter 60, all works well. But if I enter 50, I get "The value entered doesn't meet the validation rule for the field or control". BTW, SSN is defined in the table as Number (Long Integer). What's the problem?

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by HI2Japan
0

Try entering 99. If it gives the same error as when 50 is entered, i think the error occurs because the validation rule says to accept numbers between but not including 50 and 99.

0

The iif function has 3 parts (condition, true, and false). Your condition is SSN=50. If your condition is true, it will display 99, if the condition is false it will put in the SSN. This is based off how you wrote it anyway. What are you trying to get the expression to do anyway?

0

I'm trying to update a table. The true condition causes Access to abort and post the message "The value entered doesn't meet the validation rule for the field or control". BTW, SSN is defined in the table as Number (Long Integer). What's the problem?

0

I am unsure atm whether having the field be set as a number would cause the problem. Why not set the SSN to be a text field with an SSN input mask?

What determines whether the SSN is valid or not? Does the table currently have a bunch of SSNs and they are typed in random ways, or what is causing you to need to generate something like this?

Understanding this would help to determine what your condition needs to be.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.