Link to home
Start Free TrialLog in
Avatar of Gjdalton
Gjdalton

asked on

Trying to return a range of results from access with just one criteria

I am trying to do a Microsoft Access 2013 query to return 7 days or results given just the first day. So the user will put in the date for Sunday and the query will return results for Sunday to Saturday.

I know I can have them do start date and end date but that seems excessive when they will always be looking for results for a specific range given the first date of the range.
If there is a way to even just query by a week somehow like "i want the 48th week of 2015" then that will work.

Any help is appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<No Points wanted>
...as Scott and Dale have already answered your question directly...

Just some small notes here.
Within the context of your question, you are dealing with two different concepts.
Sunday to Saturday
i want the 48th week of 2015
How you define a "Week" will effect each of your points
Is week 7 days?
Is a week Sunday Through Saturday?, or Monday through Sunday (ISO-8601)?
A year can have a varying number of weeks, some years have 52 weeks, others may have 53
A "week" can span two years (a few days from the end of 2014, and a few days from the start of 2015)

JeffCoachman
Avatar of Gjdalton
Gjdalton

ASKER

Thank you all. Great answers!