Table validation rule

Sicxie

New member
Local time
Today, 14:49
Joined
Feb 27, 2014
Messages
1
Hey, I cant figure out a fairly simple IIF statement I need for a table validation rule. I'll try to explain:

I have 2 fields in a table that are controlled through a form, which sets the fields either true (-1) or false (0). Lets call them Field1 and Field2. These fields need a validation rule which is dependent on FieldX and FieldY.

When FieldX = FieldY, I need Field1 to be either 0 or -1

if Field1 is 0 -> Field2 is -1 and the other way around.

if FieldX <> FieldY -> Field1 = 0 and Field2 = 0


I hope someone can understand that gibberish.
 
Is this for a school project? Are you REQUIRED to use IIF? I ask because something like this would be best don in a private Sub called by the AfterUpdate event of both FieldX and FieldY using a Select...Case statement rather than a rather complicated IIF in both fields' Validation rules.
 

Users who are viewing this thread

Back
Top Bottom