Validation: Basic Problem from a new user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a ticket system.

In one table I have the fields OAP, Child and Adult.

No field is allowed to have a greater value (or equal) than 4 and
collectivly they must be equal or less than four.

I've tried a few validation methods but none have worked.

Please help!
 
Damo447 said:
I have created a ticket system.

In one table I have the fields OAP, Child and Adult.

No field is allowed to have a greater value (or equal) than 4 and
collectivly they must be equal or less than four.

I've tried a few validation methods but none have worked.

Please help!
 
In a table-level validation rule, you cannot reference other columns. You'll
have to do this at the form level.

Barry
 
Barry Gilbert said:
In a table-level validation rule, you cannot reference other columns. You'll
have to do this at the form level.

Incorrect. In table design you cannot create a *field* validation rule that
references other fields but you can create a *table* level validation rule that
does.
 
My mistake. Open the table in design view. Select View>Properties. In the
Validation Rule property, enter:

[oap]<4 And [child]<4 And [adult]<4 And ([oap]+[child]+[adult]<4)

Barry
 
Back
Top