Validation: Basic Problem from a new user

D

Damo447

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!
 
D

Damo447

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!
 
B

Barry Gilbert

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

Barry
 
R

Rick Brandt

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.
 
B

Barry Gilbert

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
 

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