G
GavinD
I am creating a basic project tracker database in Access 2003 and have the
following table.
ProjectID Start_Date End_Date
Project1 06/06/2008 30/06/2008
Project2 16/07/2008 30/07/2008
Project3 11/08/2008 11/09/2008
Project4 14/09/2008 06/10/2008
Project5 28/10/2008 07/11/2008
Project6 19/11/2008 05/01/2009
Project7 07/01/2009 15/01/2009
What I am trying to create is a report that calculates the number of days
worked on each project and summarises the results by month. The problem that
I have is that many of the projects span more than one month so the working
days for each month have to be calculated and combined with other projects
that span the same month.
Please note that I want the results to measure the working days (ie Mon –
Fri) only, not just the number of days between the start and the end dates.
Using the above data, the result I am looking for should look something like
this. (The values are hopefully correct, but I did have to calculate manually)
REPORT OUTPUT
Month/Year Total Days Worked
Jun-08 17
Jul-08 11
Aug-08 15
Sep-08 21
Oct-08 8
Nov-08 13
Dec-08 23
Jan-09 10
I had a very similar problem in Excel sometime ago and it was resolved using
arrays (I can’t take the credit for that either), but I cannot figure out how
to use the Excel method in Access.
Any ideas, example or suggestions gratefully received.
Gavin
following table.
ProjectID Start_Date End_Date
Project1 06/06/2008 30/06/2008
Project2 16/07/2008 30/07/2008
Project3 11/08/2008 11/09/2008
Project4 14/09/2008 06/10/2008
Project5 28/10/2008 07/11/2008
Project6 19/11/2008 05/01/2009
Project7 07/01/2009 15/01/2009
What I am trying to create is a report that calculates the number of days
worked on each project and summarises the results by month. The problem that
I have is that many of the projects span more than one month so the working
days for each month have to be calculated and combined with other projects
that span the same month.
Please note that I want the results to measure the working days (ie Mon –
Fri) only, not just the number of days between the start and the end dates.
Using the above data, the result I am looking for should look something like
this. (The values are hopefully correct, but I did have to calculate manually)
REPORT OUTPUT
Month/Year Total Days Worked
Jun-08 17
Jul-08 11
Aug-08 15
Sep-08 21
Oct-08 8
Nov-08 13
Dec-08 23
Jan-09 10
I had a very similar problem in Excel sometime ago and it was resolved using
arrays (I can’t take the credit for that either), but I cannot figure out how
to use the Excel method in Access.
Any ideas, example or suggestions gratefully received.
Gavin