R
ram
I would like help with the following problem: I ‘m trying to have Access
calculate the month to date (MTD) value for each month. The result for each
month should be 10. I have tried to use the suggestions provided and
variations of the suggestion but haven’t been successful.
Thank you in advance for any help with this problem.
Table1
Employee Date1 Year to Date Hours MTD
Bill 1/1/08 10
Bill 2/1/08 20
Bill 3/1/08 30
Bill 4/1/08 40
Bill 5/1/08 50
Bill 6/1/08 60
Code I’m currently using:
SELECT TABLE1.Employee, TABLE1.Date1, TABLE1.YTD, [YTD]- (SELECT Sum(YTD)
AS SumOfYTD
FROM TABLE1 AS Dupe
WHERE TABLE1.Date1 > Dupe.Date1 AND Table1.Employee = Dupe.Employee)
AS MTD
From Table1
WHERE [Date1] > DateSerial(Year(Date()), 1, 1);
calculate the month to date (MTD) value for each month. The result for each
month should be 10. I have tried to use the suggestions provided and
variations of the suggestion but haven’t been successful.
Thank you in advance for any help with this problem.
Table1
Employee Date1 Year to Date Hours MTD
Bill 1/1/08 10
Bill 2/1/08 20
Bill 3/1/08 30
Bill 4/1/08 40
Bill 5/1/08 50
Bill 6/1/08 60
Code I’m currently using:
SELECT TABLE1.Employee, TABLE1.Date1, TABLE1.YTD, [YTD]- (SELECT Sum(YTD)
AS SumOfYTD
FROM TABLE1 AS Dupe
WHERE TABLE1.Date1 > Dupe.Date1 AND Table1.Employee = Dupe.Employee)
AS MTD
From Table1
WHERE [Date1] > DateSerial(Year(Date()), 1, 1);