473,397 Members | 1,960 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,397 software developers and data experts.

Budget Calculations in Access

Hello, and thank you in advance for your time.

I'm using Ms Access 2007 to create a database that contains 5 different training course that we offer, each course receives a certain budget per year, each time the course is given throughout the year we calculate the cost as follows:

number of trainees * cost per trainee = Amount spent

then

Amount spent - main course budget = budget remaining

I made a table in access called "Course_Budget" that contains Course_type, Main_Assigned_Budget, Assigned_Date

and another table called "Course" which has all course information such as number_of_trainees, cost_per_trainee,location, partner, duration and such.

I created a query as follows

Course_type, Main_Assigned_Budget, Number_of_Trainees, cost_per_Trainee

with two calculated fields called "Amount_Spent" and "Budget_Remaining"

My problem is that the outcome is not accurate, because it deducts the Amount_Spent from Main_Assigned_Budget in every row, which gives different Budget_Remaining every time.

I just want a way to make it consistent in a way that when it deducts the amount for the first time, the database should know to deduct the new Amount_Spent from that last output.

I could upload my DB if my explanation wasn't enough.
and thanks again.
Jul 25 '11 #1
1 2310
nico5038
3,080 Expert 2GB
Basically you need a "running sum" for the "Amount_Spent" and calculate the correct "Budget_Remaining".
This can be achieved in a query using a DSUM() function with a "WHERE" part totalling all rows with a unique ID "equal or lower" as the current row.

The easy way is however to use a report and set the property of the "Amount_Spent" field to "Running sum" and add a calculated field for calculating the remainder.

Getting the idea?

Nic;o)
Jul 25 '11 #2

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

Similar topics

9
by: MacDermott | last post by:
I have an Access MDB which instantiates a class in a custom DLL, manipulates it for a while, then sets it equal nothing. The MDB does other things,too, and generally behaves itself as desired....
3
by: Ron Nolan | last post by:
I have a large application that contains lots and lots of financial history data. The history data is currently set up in a table called 'TblHist' that exists inside each of these three .mdb...
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
3
by: John M | last post by:
Hi, I've been coming up against a failure of a report to display the result of a simple calculation. I have realised that this calculation cannot take place unless the field I am working on is...
27
by: Gregc. | last post by:
G'day I am thinking doing out budget for the next financial year in MS Access (previously it was done in excel). Would anyone know of any good websites/materials that I could look at to get...
15
by: sparks | last post by:
We get more and more data done in excel and then they want it imported into access. The data is just stupid....values of 1 to 5 we get a lot of 0's ok that alright but 1-jan ? we get colums...
11
by: Rico | last post by:
I have a data file that I converted from Access to SQL Server using the upsizing wizard. I then attached the tables to the Access front end using an ODBC connection. I have one table that is read...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
5
by: algram | last post by:
Hi bytes experts: My boss just told me I have to transfer a huge Budget estimation tool (done in excel) to access in order for it to be more customer friendly. Unfortunately I am not even sure...
1
by: AccessBeetle | last post by:
SELECT DISTINCT .Contact1Index, Contacts., Contacts., Contacts., Contacts., Contacts.prefix, Contacts.Suffix, Contacts., Contacts., Contacts.city, Contacts.state, Contacts.zip, ., tblStatusCloseout.,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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...
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...
0
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...

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.