473,657 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calculation of running balance using a query

1 New Member
Hello Everyone,

Im a certified public accountant here in the Philippines. Im using microsoft access 2000 and 2003 running in a Windows XP environment.

Im having a problem of how to calculate a running balance using a query coming from two tables.

This is my problem. I have two tables (Sales and Collections), with these table I wanted to have a query to recalculate a running balance everytime there is a sales and collections transactions.

Thank you,

King
Mar 27 '08 #1
2 4028
Scott Price
1,384 Recognized Expert Top Contributor
Does
Expand|Select|Wrap|Line Numbers
  1. SELECT Sum(tblSales.Sales) As [SumOfSales] FROM tblSales
not work for you?

To make it recalculate whenever there is an additional Sales entry you just need to add a code line in the AfterUpdate event of whatever control is used to update the Sales figure:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.Requery ("[QueryName]")
Regards,
Scott
Mar 30 '08 #2
Scott Price
1,384 Recognized Expert Top Contributor
This can also be done from within an unbound text box on your form where the totals are entered using something like this:
Expand|Select|Wrap|Line Numbers
  1. =Sum(DLookup("Sales", "tblSales"))
Regards,
Scott
Mar 30 '08 #3

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

Similar topics

3
5090
by: paul | last post by:
I have a query that takes monthly totals and rolls them up to get a balance at a specific time code eg: dt bucket mon_ttl --- ------ ------- 199903 0192 -172527 199906 0192 546707 199909 0192 -278684 199910 0192 1100139
1
6994
by: Gx | last post by:
I have this form with the fields: * Product: (drop down combo box) with choices - X, Y * Amount: (currency ) * Balance (currency) I want to associate product X with the percentage amount of 50 %, Y with 10
5
6774
by: bobdydd | last post by:
Hi Guys Can anyone help I am trying to find a way to implement a running balance that will re-calculate if the date order is changed, or if an earlier record is changed like you might want to do during a bank statement reconcile. I am using the following fields Date|Payment|Deposit|Running_Balance (tblTransactions)
4
2685
by: Rose | last post by:
A newbie question: I would like my repeater to look like the following where in the Balance column, I want to keep a running balance, like so Description Amount Balance Item 1 $10 $10 Item 2 $15 $25 Item 3 $5 $30 Essentially, Balance = Balance + Amount for each row. I want to do this in a
3
1373
by: Marina | last post by:
I have a querie that needs to use multiple calculations (...I think...) Fields: TransID TransDate TransDescipt ClientID HoursBilled BillingRate
4
1877
by: Jx4 | last post by:
I have a table with the account balance, a table with the account holders infomation, a table with the interest rate, and a table with the transactions. Then I start the queries to get some amounts that I need. I have a query that tells you the transactions done in the first month. A query that sorts them with all the accounts. A query that adds interest on the transactions. A query that adds interest on the balance. A query that take...
4
1790
by: Jx4 | last post by:
Hi, I am creating a report for different accounts. I have a starting balance, and transactions. Everything is working great, however I am not able to create another column that can have the transaction column + the starting balance. I want a continuous balance down the one side of the report. I can get the transaction to total by creating a "running sum" column, but is there a way to create another column that uses that information in a...
4
7625
by: student2 | last post by:
Hi :-) I'm using Ms Access 2003 to create a DB for my school project and I need to accomplish the following:- * Calculate balances for stock (inclusive of sales and replenishment to stock) My table (StockDetails): StockId (PK) OriginalStock
2
2607
by: sazd1 | last post by:
I am using vb express and MsAccess as database. I am trying to write a query for the calculation of Stock. My tables are as under: PId PDate ItemId Description Price Quantity Amount 1 28/8/2009 1 Coca Cola Normal 1,00 10 10,00 2 28/8/2009 2 Coca Cola Zero 1,00 5 5,00 3 29/8/2009 1 Coca Cola Normal 1,00 5 5,00 4 29/8/2009 2 Coca Cola Zero 1,00 10 ...
0
8319
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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
8512
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,...
1
6175
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
5638
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
4171
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...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.