Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Append query with running bala
Maarten Brusselers 
   
4 years ago
How do I create an append query that will update the balance in a table by taking the value of the previous record, add or substact the value in the present record from that and put the new balance in the table balance field. In excel this is simply by c2=c1+a2-b2 where c is the balance,a is the added value and b is the substracted value.I know this has to be simple but I can't figure out how to do it.
Kevin Robertson  @Reply  
           
4 years ago
Check Register

The Extended Cut shows how to do a Running Balance.

See also: Access Expert 29
Maarten Brusselers OP  @Reply  
   
4 years ago
Thanks Kevin.
Kevin Robertson  @Reply  
           
4 years ago
You're welcome.
Maarten Brusselers OP  @Reply  
   
4 years ago
I looked at both Check Register and Expert 29.  Both however only gave me the running balance in a form.  I would like to have the running balance in the table.  I guess that would be possible with a query but how?
Kevin Robertson  @Reply  
           
4 years ago
Don't put the Running Balance in the Table.
The Extended Cut shows how to properly calculate the Running Balance in a Query.
Kevin Yip  @Reply  
     
4 years ago
Putting balances in a table may not be a bad idea.  At any given date and time, the balance can only be of one value, and it can't be anything else.  Such absolute values are best to be stored in tables as static values.  In fact, I would put a starting balance and an ending balance on every row of transaction so that I get the full picture every time I look at a row.  And I wouldn't need to keep updating the balances with queries, solving the original problem of this thread.  The only update needed to be done is that whenever a new row is added, you use DLookup() to retrieve the ending balance of the latest date and time (with the help of the DMax function) and store it as the starting balance of the new row.  That is easily done with a form's BeforeInsert event.
Maarten Brusselers OP  @Reply  
   
4 years ago
Thanks both Kevins. I'm at Expert 10 level so still a bit to learn before I can do that properly.
Richard Rost  @Reply  
           
4 years ago
Both methods have merit. I know banks keep the starting and ending balance for each transaction. Calculating it like this is easier for beginners.
Maarten Brusselers OP  @Reply  
   
4 years ago
I presume this means that I have to base my data input form on an append query, correct?
Richard Rost  @Reply  
           
4 years ago
No. You don't base a form on an action query.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/17/2026 12:09:18 PM. PLT: 0s