Search code examples
ms-accessms-access-2016

Validation Rule in Property Sheet Not Doing Anything


I am using MS Access 2016

I have two dates, a start date and an end date. I want to make sure that the end date occurs after the start date so I wrote a validation rule in the Property Sheet.

I wrote:

[End Date]>=[Start Date]

However it does not work. If I put an end date that occurs before the Start Date, the entry is still valid.

Any help will be appreciated.

Edit:

enter image description here

What I highlighted red is where I get the error:

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


Solution

  • Leave the validation rule for the field(s) empty. Then, for the table (your yellow marking), set validation rule to:

    [End Date]>=[Start Date]