I was told the same thing that table field validation
rules can't reference any other field. I was suggested by
the table group to use form for this job. There must be
some way to do it. Who can help?
There are two kinds of validation rules that you can set in table
design view:
Field Validation: done by selecting a field and setting a validation
rule in the box at the bottom of the screen. This is "field
validation" and cannot refer to any other fields, nor to a
user-defined function.
Table Validation: done by selecting View... Properties while the Table
is in design view, and entering a logical expression (which CAN refer
to any field in the table, though only in the current record) in the
"Validation Rule" property, and a message to be displayed if that rule
is violated in the "Validation Text" property.
There is no such thing as "table field validation" - there's table
validation, and there's field validation; each is useful in its own
realm.
In your example:
How do I put at the validation rule for field5 in order
to let all data inputs following the rule of
field5>=field1 if field2, field3, and field4 are null.
A Validation Rule of
(Field2 IS NULL AND Field3 IS NULL And [Field3] IS NULL And [Field4]
IS NULL AND [Field5] >= [Field1])
OR
(Field2 IS NOT NULL Or Field3 IS NOT NULL Or Field4 IS NOT NULL)
with a Validation Text of
"If Fields 3, 4 and 5 are empty then Field5 must be greater than or
equal to Field1"
should meet your needs.