Calculate data in same column

dinpaiman

New member
Local time
Today, 22:50
Joined
Aug 5, 2010
Messages
1
Hi Everyone,

currently my friend and I developing a database.

unfortunately we have to calculate the data in a same column. For example,

data in first row minus data in second row.

Can anyone help me on this thing ?
 
Either your question is worded incorrectly or you are not in database thinking mode.

You can easily calculate values from record fields but this is done "on the same row" within fields of the same record.
An example would be 10 items @ $2.00 each = $20.00 - the 20 being the calculated field.
This usually done by a Query or within controls on a Form or Report.

Where you want the total of a number of records - this is possible but first you have to restrict the records some way.
Unlike a Spreadsheet where you just highlight the range to sum, in a database you should assume there may be any number of records and you want to first filter these to just get the relevant ones.

You can use a Totals Query to sum the records or even have the records displayed on a form or report where a header or footer calculated control does the Maths for you.

Unlike a Spreadsheet, the result is not stored with the records. ie you can not insert a Total line.

Should you wish to store the total - most often not done, then it would be stored in another table to the one you get the records from to calculate.

Check out some of the terms above and restate your question and provide some details of what you want to do.
 

Users who are viewing this thread

Back
Top Bottom