Query Date Filter

  • In MS Access, I have a query that I manually input a date range. In my criteria, I have the following listed:

    CriteriaBetween [Enter Start Date] And [Enter End Date]

    I want to change the criteria to automatically run the query to show only records between Saturday-Saturday regardless of the day of the week that the report is run.

    Any ideas are greatly appreciated.

  • You will find that the WeekDay() function is your friend in this case. Do a search and you will find information on how to use it. Basically it returns the day of the week as a number from 1 to 7 and using it in conjunction with the Date() function (which gives you the current date based on your PC clock), you can determine the current day of the week. You then add and subtract the amount required to get to 7 for the two Saturdays to complete your BETWEEN statement.

    Wendell
    Colorful Colorado
    You can't see the view if you don't climb the mountain!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply