Week starting ? criteria

  • Thread starter Thread starter cseguin
  • Start date Start date
C

cseguin

Guest
Want to use criteria in a date field to query data a week at a time. Open the query and have it ask for week starting MM/DD.
Date input will normally use the Monday of each week and expect data back for Monday through Sunday
 
Hi -

Try copying/pasting this to the criteria cell of your date field. When prompted, enter any date in the target week, e.g. 2/17/06. It should return all dates within the week (Mon - Sun).
Code:
Between DateAdd("d",-(Weekday([enter a date])-2),[enter a date]) And DateAdd("d",8-Weekday([enter a date]),[enter a date])

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom