• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 515
  • Last Modified:

Validating that a user entered date is on a 'Friday'

Hi Experts!

I'm trying to figure out how to validate if a form entered date is on a Friday (any friday). I imagine that it involves the weekday() function = 6, but can't seem to get syntax right. Also, I'm trying to do this in the table - should I be doing this on the form instead?

Your help is greatly appreciated!
1 Solution
Patrick MatthewsCommented:
If the control is bound to an actual table column with data type date, then I would enforce this in the database layer and not the application layer.

1) Open the table in design view
2) Select the column
3) For Validation Rule, use:

Weekday([ColumnName]) = 6

4) For Validation Text, use whatever message you want displayed when this rule is violated
billg7Author Commented:
Worked beautifully! Thank you!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now