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

Posted on 2012-09-07
Last Modified: 2012-09-07
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!
Question by:billg7
    LVL 92

    Accepted Solution

    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
    LVL 1

    Author Closing Comment

    Worked beautifully! Thank you!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now