Table record validation rule expressions

G

Guest

I need to put a validation rule in the properties box in a table so that it
affects the whole record. But I don't know how to type my expression - or
even if what I want to do can be done?!? The expression in english is this:
If Field1 = "Bs" then Field2 and Field3 must be NULL

If you have any ideas please reply in plain english as I'm new at this
computer stuff - you may have guessed!

Thanks
 
A

Allen Browne

Try this:
([Field1] Is Null Or [Field1] <> "Bs") OR ([Field2] Is Null AND [Field3] Is
Null)

The rule is satisfied if Field1 is blank or contains anything other than
"Bs".
It is also satisfied if Field2 and Field3 are both blank.
 
G

Guest

It works!!!
Thank you - you are a shining star!


Allen Browne said:
Try this:
([Field1] Is Null Or [Field1] <> "Bs") OR ([Field2] Is Null AND [Field3] Is
Null)

The rule is satisfied if Field1 is blank or contains anything other than
"Bs".
It is also satisfied if Field2 and Field3 are both blank.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

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

Lucy said:
I need to put a validation rule in the properties box in a table so that it
affects the whole record. But I don't know how to type my expression - or
even if what I want to do can be done?!? The expression in english is
this:
If Field1 = "Bs" then Field2 and Field3 must be NULL

If you have any ideas please reply in plain english as I'm new at this
computer stuff - you may have guessed!

Thanks
 

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