Validation rules in form objects?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can i use a validation rule for one form object that refers (the rule) to
another object when both objects refer to entries in the same table?
 
You want to perform a comparison, such as making sure the StartDate is
before the EndDate?

You cannot do that with a validation rule in your form, because you don't
know which entry the user will give first. (They can click anywhere.)
Therefore you need to use the BeforeUpdate event of the *form*, not the
controls.

A simpler way is to use the Validation Rule in the table itself.
1. Open the table in design view.
2. Open the Properties box (View menu).
3. Enter a rule such as:
[StartDate] <= [EndDate]

Note that this must go in the Validation Rule in the Properties box, not the
one in the lower pane of table design which applies to a field.
 
Back
Top