A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Running Total / Concatinate question



 
 
Thread Tools Display Modes
  #1  
Old February 15th, 2007, 10:48 PM posted to microsoft.public.access.queries
Daesthai
external usenet poster
 
Posts: 7
Default Running Total / Concatinate question

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!
  #2  
Old February 15th, 2007, 10:53 PM posted to microsoft.public.access.queries
Daesthai
external usenet poster
 
Posts: 7
Default Running Total / Concatinate question

Correction - the ID number is saved as a number...not as text.
  #3  
Old February 15th, 2007, 11:52 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Running Total / Concatinate question

Post the SQL of your query and sample data.

"Daesthai" wrote:

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!

  #4  
Old February 16th, 2007, 12:39 AM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Running Total / Concatinate question

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
'================================================= ===


Daesthai wrote:
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!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.