Discussion Locked

Selecting Multiple Date Ranges

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,
I have been given an MS-Access 97/2003 database to administrate... I need to create a (date reange) formula/process that calaulates quarter segments of the year. Ex: 01/01/05 - 03/30/05
Then I need another (date range) formula/process that calculates the week. Once that is done, I need to be able to choose 1 process, from another. Ex: Msg "What Date Range Do You Want To Apply" 1. Weekly 2. Quarterly
Can/will someone direct me to an example???

Thank you,

3 replies

by gsteve

I'm just going to take a stab at this, but I'm not sure if it is what you are looking for. I think what you want to do is build a table manually that has (at least) three fields: lngQuarter, lngWeekNumber, and dtDate. Have each row represent one date.
lngquarter lngWeekNumber dtDate
1 1 1/1/06
1 1 1/2/06
1 1 1/3/06
1 1 1/4/06
1 1 1/5/06
1 1 1/6/06
1 1 1/7/06
1 2 1/8/06
1 2 1/9/06
1 2 1/10/06

(you can catch on to the pattern from there...)

You can actually set the table up easier in Excel, by copying the dates down, then filling in the quarters and weeks (sorry, I don't think excel/access has a built in function to figure this) then import it into your Access db.
Once you have your table set up, you can incorporate the values into queries.
Let me know if you need more details, I would be glad to try to help more!

This discussion is closed to new replies.