How can I check if an entered date is for this week based on Monday=1st day?

I have an Access query that will run depending on what date the user enters. They will only be entering Mondays (it is the first day of our work week) to return data because Mondays are the days associated with the start of a job. However, I need to check if the Monday they entered is for either this week or next week. How would I implement the following? (written in pseudo code)

Switch(job_date=this week's Monday, calculation A, job_date=next week's Monday, calculation B)

Thanks!

Bonus mission: I’ve read that there is no difference in using Switch vs. IIf. Switch makes your code much easier to read, but does it provide other advantages? Is it faster?


Source: sql

Leave a Reply