Share via

Validation rule for multiple columns

Anonymous
2012-03-13T05:23:29+00:00

I have a table which contains the order details...

In that table I have two fields named

Ordered date

and Delivery Date

I have to create a validation rule in the delivery date so that the user cannot enter a date less than the Ordered date..

Please help me in this ....

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-03-13T08:39:09+00:00

You have to set the Validation Rule in the properties of the table, not in the properties of one of the fields.

Was this answer helpful?

30+ people found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2012-03-13T06:41:54+00:00

    You can create a Validation Rule and Validation Text for the table as a whole.

    Open the table in design view.

    Activate the Property Sheet.

    Enter the rule in the Validation Rule property:

    [Delivery Date]>=[Ordered Date] Or [Delivery Date] Is Null

    and enter an appropriate message in the Validation Text property.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-03-14T00:33:04+00:00

    It really works..Thanks a lot....

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2012-03-22T08:50:39+00:00

    I am sorry. When I tried putting the formulas in table, Again the delivery table is accepting all the dates. Less than and greater than ordered dates.

    Whether I have to change anyother property.

    I have set  a validation rule for the ordered date. But no Validation rule was set for the Deliverred date.

    The formula which you have suggested I have updated in the prpoerty sheet of the tables.

    Whether I have to do something more...

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-03-13T07:31:12+00:00

    I tried the above and I got the following error message.

    Invalid SQL Syntax- Cannot use multiple columns in a column level CHECK constraint

    Please help ..

    Was this answer helpful?

    0 comments No comments