473,770 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query with Grouped Running Totals

I have done a bunch of looking but I am confused as to the correct way
I should proceed with this problem.

I have query that returns: It is sorted by ordnum then, linenum, then
date and it creates a table called Temptable.

ordnum linenum qtyord Date qtyship
1234 1 500 2/1/05 150
1234 1 500 2/2/05 200
1234 2 300 2/5/05 130
1234 2 300 2/7/05 170
1245 1 600 2/2/05 200
1245 1 600 2/3/05 150
1245 1 600 2/4/05 150

I would like to change update this table with running totals with each
record to something like this

ordnum linenum qtyord Date qtyship qtyremain
1234 1 500 2/1/05 150 350
1234 1 500 2/2/05 200 150
1234 2 300 2/5/05 130 170
1234 2 300 2/7/05 170 0
1245 1 600 2/2/05 200 400
1245 1 600 2/3/05 150 250
1245 1 600 2/4/05 150 100

I have tried using the DSum function but I just cant seem to get the
query correct. Would this be easier if it was done in VB.

Any help would be greatly appreciated. If anymore info is needed
please let me know. This is done in Access 2000

Thank you,

Darren

Nov 13 '05 #1
0 1308

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1657
by: NotGiven | last post by:
I have two tables, Client and Project, related by clientID. I want to display a table with total CURRENT projects and total COMPLETED projects per client. I'd like for it to show like this: Client Name Current Proj Completed Proj Stan's Dormers 4 12 Larry Lincoln Dealership 2 1
3
1663
by: Paul Mendez | last post by:
Performance_Date SumOfBudget_NOI CurrYTD_BudgetNOI_Total 1/1/2004 $4,184,626.00 ? 2/1/2004 $4,484,710.00 ? 3/1/2004 $4,537,424.00 ? 4/1/2004 $4,826,850.00 ? 5/1/2004 $4,966,326.00 ? Can someone help? What I am trying to do is create a query that will end up looking like the bottom example. The above query is a calculated totals query with an...
2
35896
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to write the correct expression due to the "groupby" needed to group the city count in the first column. Any clues?
0
1064
by: ddecoste | last post by:
I have done a bunch of looking but I am confused as to the correct way I should proceed with this problem. I have query that returns: It is sorted by ordnum then, linenum, then date and it creates a table called Temptable. ordnum linenum qtyord Date qtyship 1234 1 500 2/1/05 150 1234 1 500 2/2/05 200 1234 2 300 2/5/05 130
13
1754
by: Maxi | last post by:
I have a table (Table name : Lotto) with 23 fields (D_No, DrawDate, P1, P2,.....P21) and it has draw results from 1st Sep 2004 till date. I have another table (Table name : Check) with 15 fields (F1,F2,....F10, R6, R7, R8, R9, R10). I have few lacs combinations of 10 numbers in the Check table in the first 10 fields F1-F10). I want to check how many numbers from the first combination (record1 of Check table, fields F1-F10) matched in...
16
11320
by: Gandalf186 | last post by:
I need to create a query that produces running totals for every group within my table for example i wish to see: - Group A 1 5 9 15 Group B
2
3030
by: brob | last post by:
I am Access newbie looking for some guidance in putting together a query that can output a table of max values in a given column grouped by a couple of other columns. Here is an example of what I need the query to do. Existing Data Table:Z A B C D E 1 1 1 7 12 1 1 2 6 43
9
4023
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 my fields. When I try to run it I get #errors in my RunTot column. I'm kinda new to this. Not sure if maybe I mistyped something wrong or is there a better way to do this? I have pasted the code. Any help would be greatly appreciated....
7
4010
by: tsuedesu | last post by:
Hi, I am trying to create a report that will show the totals of a query. I have a table as follows Table :Sales Fields: CustName, Product, $Value, VolumeOrdered, DeliveredQuantity, Period I've made a query that retrieves records with in a certain period (aug-08,Sept-08,etc), grouping by CustName and displaying the list of individual products purchased. So the report shows the same information, list of products purchased, grouped by...
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10071
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.