I'm working in an Access 2007 db and I have a table that stores forecasted hours by project by week-ending date (Fridays). What i'm working on is a report that shows those forecasted hours by project by month.
The problem that I'm having is that some weeks are split between 2 months and they want those forecasted hours to be represented in their respective months. For example the first week of February has 2 days in January and 3 days in February and they want those numbers to show up in the month that they're being utilized in.
Here's the logic that I have worked out so far:
If Day([WEDate]) < 5 Then
Hrs/Day = [fcstHrs]/5
Days1 = Day([WEDate])
Days2 = 5 - Day([WEDate])
Hrs1 = Hrs/Day * Days1
Hrs2 = Hrs/Day * Days2
Unfortunately I can't work out how to implement this logic so any ideas you guys have would be greatly appreciated. Also if you know of a better method to accomplish this feel free to let me know.
Travis
The problem that I'm having is that some weeks are split between 2 months and they want those forecasted hours to be represented in their respective months. For example the first week of February has 2 days in January and 3 days in February and they want those numbers to show up in the month that they're being utilized in.
Here's the logic that I have worked out so far:
If Day([WEDate]) < 5 Then
Hrs/Day = [fcstHrs]/5
Days1 = Day([WEDate])
Days2 = 5 - Day([WEDate])
Hrs1 = Hrs/Day * Days1
Hrs2 = Hrs/Day * Days2
Unfortunately I can't work out how to implement this logic so any ideas you guys have would be greatly appreciated. Also if you know of a better method to accomplish this feel free to let me know.
Travis