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 Help



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2007, 12:25 AM posted to microsoft.public.access.queries
OShea
external usenet poster
 
Posts: 7
Default Running Total Help

A mate of mine posted a question recently but had a bit of difficulty so
let's give this a shot. I am building this as a subquery to hopefully make it
easier as the original had FTE as a calculation as opposed to an actual data
field. Clear as mud? I've done similar before but can't seem to get it going
this time around.

What we would like is to get a running total of the field FTE for this query:

SELECT [FTE-SVTRA].[Employee Name], [FTE-SVTRA].FTE
FROM [FTE-SVTRA];

Thanks for your time.
  #2  
Old February 25th, 2007, 06:33 PM posted to microsoft.public.access.queries
Seth Schwarm
external usenet poster
 
Posts: 49
Default Running Total Help

OShea:

Consider a strategy from Access Hacks by O'Reilly, Hack #43.

SELECT FTE-SVTRA.Employee Name, FTE-SVTRA.Employee No, FTE-SVTRA.FTE
FROM FTE-SVTRA
UNION ALL SELECT "Total" AS cEmployee Name, "Total" AS Employee No,
Sum(FTE-SVTRA.FTE) as SumofFTE
FROM FTE-SVTRA
ORDER BY FTE-SVTRA.Employee No;

This is a union query which will 'append' the running total of all FTE for
all Employees. If you use the Order By clause it will cause the 'Total' row
to appear as the last row of your data.

Seth Schwarm





"OShea" wrote:

A mate of mine posted a question recently but had a bit of difficulty so
let's give this a shot. I am building this as a subquery to hopefully make it
easier as the original had FTE as a calculation as opposed to an actual data
field. Clear as mud? I've done similar before but can't seem to get it going
this time around.

What we would like is to get a running total of the field FTE for this query:

SELECT [FTE-SVTRA].[Employee Name], [FTE-SVTRA].FTE
FROM [FTE-SVTRA];

Thanks for your time.

  #3  
Old February 26th, 2007, 09:09 PM posted to microsoft.public.access.queries
OShea
external usenet poster
 
Posts: 7
Default Running Total Help

Thanks for the response. But it is telling me it is missing an operator when
I try to run it.

"Seth Schwarm" wrote:

OShea:

Consider a strategy from Access Hacks by O'Reilly, Hack #43.

SELECT FTE-SVTRA.Employee Name, FTE-SVTRA.Employee No, FTE-SVTRA.FTE
FROM FTE-SVTRA
UNION ALL SELECT "Total" AS cEmployee Name, "Total" AS Employee No,
Sum(FTE-SVTRA.FTE) as SumofFTE
FROM FTE-SVTRA
ORDER BY FTE-SVTRA.Employee No;

This is a union query which will 'append' the running total of all FTE for
all Employees. If you use the Order By clause it will cause the 'Total' row
to appear as the last row of your data.

Seth Schwarm





"OShea" wrote:

A mate of mine posted a question recently but had a bit of difficulty so
let's give this a shot. I am building this as a subquery to hopefully make it
easier as the original had FTE as a calculation as opposed to an actual data
field. Clear as mud? I've done similar before but can't seem to get it going
this time around.

What we would like is to get a running total of the field FTE for this query:

SELECT [FTE-SVTRA].[Employee Name], [FTE-SVTRA].FTE
FROM [FTE-SVTRA];

Thanks for your time.

 




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 08:34 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.