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

Calculations with values in previous record(s)?

2
I have a database where I need to record student data, specifically marks and absenteeism. The marks are recorded each term as a running total. I have a final mark which needs to be equal to the 4th term mark.

I also need to record the number of days absent each term with a total at the end of the year.

My problem is that the term 4 mark is a in the previous record and the total days absent needs to be the total of the previous 4 records (term 1 - 4).

I using a create table query and an update query but that was a no go.
Attached Files
File Type: zip Students.zip (29.7 KB, 42 views)
Jan 12 '15 #1
2 1068
kurazy
2
My apologies if I wasn't clear in my post. I also simplified my sample database.

In tblMarks record 5, the mark has been set as the same as the previous mark.

Mark Term
42 1
32 2
45 3
65 4
65 5 (This is the final mark that needs to be equal to term 4 mark)


In tblAbsent record 5, the number of days absent is equal to the sum of the previous 4 days absent.

Absent Term
2 1
2 2
4 3
2 4
10 5 (Sum of terms 1 to 4)

The year is broken up into 4 terms.

I hope this clarifies things.
Attached Files
File Type: zip Students(2).zip (28.1 KB, 47 views)
Jan 12 '15 #2
twinnyfo
3,653 Expert Mod 2GB
kurazy,

I cannot open zip files at work.

However, based on your descriptions, it may be that your table structures are not completely normalized.

My initial thought is that there should be no need for a "5th" term, but when data is displayed showing totals, it is calculated at run-time.

In terms of the marks, it is unclear whether these marks are averages or overall totals, so please clarify how the 4th quarter marks are determined.

Concerning the absenteeism, an aggregate query should be able to add the total days absent for each student (for the year).
Jan 21 '15 #3

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

Similar topics

1
by: JRT | last post by:
I have a continuous form with 3 comboxes, combo1, combo2 combo3. The choices in combo2 are dtermined the what is selected in combo1 by using a where = combo1 statement. The combo is refreshed...
1
by: allyn44 | last post by:
Hello, I have a table that has null fields that need to be filled in with the value of the previous record (example below) id date 1 2/2/02 2 3 4/4/02 4
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
4
by: virtualgreek | last post by:
Dear All, First of all I would like to take the time to thank you all for your efforts and time spent at this wonderful forum. I have found it very helpful with numerous examples available for...
1
by: sushant2009 | last post by:
Hi , I want to display empty databae table(actually table contains lot of records) to datagrid using dataset and dataadpter. After displaying i will fill new records in datagrid and i will save...
4
by: mathanraj76 | last post by:
I current doing a project for "CWS" invoices for data entry in ms access 2000 I have a diffulcuties in the textbox. for an exampe : In one invoices may have up to 4 customer .But in 1 invoice...
0
by: auxvivrespos | last post by:
I am using Access 2003 and I have built a simple little database to keep track of invoices that are received at my office. I have created a "Suppliers" table which is a list of the companies from...
2
doma23
by: doma23 | last post by:
Would it be possible later to do query calculations between two records even when one of the two records doesn't exist? Example: COMPANY____PERIOD___SALES Company1___1H2012___125...
1
by: PreethiGowri | last post by:
I have a login table which as columns name, employee_id, date,login, logout; everything works fine until a regular updation of login and logout is done(i.e every login having a logout). my problem is...
0
by: fran7 | last post by:
Hi, I wonder if anyone could point mne in the right direction. I have many many individual members profile pages. Each has a unique query. ...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.