473,394 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Running totals in Access queries

Using Access 2003 I am trying to construct a query to provide data for a stacked column graph to show cumulative sales figures month on month individually by salesman. Eg. a column will represent a month and will be segmented by salesman. Each subsequent month / bar thereafter will compose of the running total of sales, again segmented by each salesman.

I have a query which has the following fields:

Month
Salesman
SalesVolume$

Therefore at each change in month, I would like a running sum for each individual salesman for the year so far.

Most examples I have seen so far seem to be 1 level more simple than this, eg. based on an example to provide a running total by by salesman and not salesman and month such as article Q233485 at support.microsoft.com

Any solutions will be greatly appreciated!
Dec 3 '07 #1
5 4546
puppydogbuddy
1,923 Expert 1GB
Using Access 2003 I am trying to construct a query to provide data for a stacked column graph to show cumulative sales figures month on month individually by salesman. Eg. a column will represent a month and will be segmented by salesman. Each subsequent month / bar thereafter will compose of the running total of sales, again segmented by each salesman.

I have a query which has the following fields:

Month
Salesman
SalesVolume$

Therefore at each change in month, I would like a running sum for each individual salesman for the year so far.

Most examples I have seen so far seem to be 1 level more simple than this, eg. based on an example to provide a running total by by salesman and not salesman and month such as article Q233485 at support.microsoft.com

Any solutions will be greatly appreciated!
Try using the crosstab query wizard, responding to the prompts as follows:
Data source: Your existing query
column header: salesman
value column: SalesVolume$
RowHeader: Month
Dec 3 '07 #2
Try using the crosstab query wizard, responding to the prompts as follows:
Data source: Your existing query
column header: salesman
value column: SalesVolume$
RowHeader: Month
Thanks for the suggestion, puppydogbuddy. Unfortunately this generates a simple total for each month, broken down for each salesman but not running / cumulative which was the objective.
Dec 3 '07 #3
hrford
8
If this is in a report you can do a =Sum([Jan]+[feb]+...) which should work....
Dec 3 '07 #4
puppydogbuddy
1,923 Expert 1GB
Thanks for the suggestion, puppydogbuddy. Unfortunately this generates a simple total for each month, broken down for each salesman but not running / cumulative which was the objective.
try adding alias column using DSum("[SalesVolume$]", "yourSourceQuery", "[Salesman] <= '" & [Salesman] & "'")

you may have to change Month to ColumnHeader and make Salesman the rowHeader in order for the DSum to work as intended.
........or

use crosstab as record source for a report and group by salesman; set running sum property of control used for running sum to yes,
Dec 3 '07 #5
missinglinq
3,532 Expert 2GB
hrford tried to post this but hit "Report" rether than Post Reply:

I'm a relative newbie but can't you write an expr in you report like in
the report footer that reads
=Sum([Jan]+[Feb]+...)
Dec 3 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bill Dika | last post by:
Hi I am trying to calculate a running total of a calculated textbox (tbAtStandard) in GroupFooter1 for placement in a textbox (tbTotalAtStandard) on my report in Groupfooter0. The problem...
1
by: Maddman | last post by:
I'm in the process of converting an Access database into a SQL 2000 database using Access Project as a front end. Here's where I'm stuck. I've replaced the old access queries with user-defined...
4
by: New Guy | last post by:
I'm trying to work with a system that somebody else built and I am confounded by the following problem: There is a table of payments and a table of charges. Each client has charges and payments...
6
by: KashMarsh | last post by:
Trying to show running totals on a report, except it needs to show one total amount and values being subtracted from it. For example, the report shows a Total Inventory amount (TotInvAmt). And...
2
by: BerkshireGuy | last post by:
I have the following code: Dim strSQL As String Dim DB As DAO.Database Dim RS As DAO.Recordset Dim intNumOfPaid, intNumOfHypoed, intNumOfNotTaken, intNumOfDeclined, intNumOfWasted,...
2
by: Jana | last post by:
Using Access 97. Background: I have a main report called rptTrustHeader with a subreport rptTrustDetails in the Details section of the main report. The main report is grouped by MasterClientID. ...
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
8
by: elias.farah | last post by:
Hello Everyone, I'm having some very weird behavior on a couple of Access forms. (Not all forms, just some of them). The forms have been working for years, under Access XP/2003 etc, and last...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.