Running Total / Concatinate question

G

Guest

I'm trying to get a running total for hours worked that are divided by
project/by date.

I have the following fields:
Project ID number (saved as text)
Date Worked
Project Name
Hours Worked
Concan (concatination of Project ID and Date worked so as to create a unique
number that specifies the specific project on a specific date, ie -
20060011/1/2005

I'm using the following formula with "Test" as the query:
RunningSum: (SELECT Sum([Hours Worked]) FROM [Test] AS [Test_1] WHERE
[Test_1].[Concan] <= [Test].[Concan])

The problem is that the returned results are not limiting themselves to the
by project/by date sumation. The running total continues through the whole
list. I need it to start over at 0 when it gets to a new project/date.

Any help would be great!
 
J

John Spencer

Try the following. It should give a running Sum for each by Project by
Date Worked.

RunningSum: (SELECT Sum([Hours Worked])
FROM Test as Test1
WHERE Test1.Project = Test.Project
AND Test1.[Date Worked] <= Test.[Date Worked])

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top