Validation rule for Access 2003

H

Hasi

Hi,

I am working on a project in Access 2003 and trying to create a validation
rule for filed in a table.

Requirement:
There are two fields -
1. Con Method - Dropdown with 6 values - A,B,C,D,E & F
2. Prime Number - Numeric field to be entered by user

Condiiton in validation rule should validate following:
If the Con Method field = C then the user must enter the Prime Number field
otherwise Prime Number field can be null.

Question to you if you can answer:
How do we implement this in validation rule for the field -> Prime Number

I was going through your turorials on webpage -
http://www.everythingaccess.com/tutorials.asp?ID=Validation-Rules
but could not get to that point.

Any help is appreciated!!

thanks,
Hasi
 
H

Hasi

Thanks Allen. Will try this and let you know the results.

Allen Browne said:
Perhaps something like this in the validation rule of the *table* (not
field):
([Con] Is Null) OR ([Con] <> "C") OR ([Prime Number] Is Not Null)

Be sure to use the table rule:
http://allenbrowne.com/ValidationRule.html#TableValidationRule
--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Hasi said:
Hi,

I am working on a project in Access 2003 and trying to create a validation
rule for filed in a table.

Requirement:
There are two fields -
1. Con Method - Dropdown with 6 values - A,B,C,D,E & F
2. Prime Number - Numeric field to be entered by user

Condiiton in validation rule should validate following:
If the Con Method field = C then the user must enter the Prime Number
field
otherwise Prime Number field can be null.

Question to you if you can answer:
How do we implement this in validation rule for the field -> Prime Number

I was going through your turorials on webpage -
http://www.everythingaccess.com/tutorials.asp?ID=Validation-Rules
but could not get to that point.

Any help is appreciated!!

thanks,
Hasi
 

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