This may sound daft but i'm using the following data: =sum([media_in]-[media_out])
This produces the requested result, but for each entry the field update ok but the previous data has been replaced. I doing test data entering 20 records into one cust_file which requires a printout of the date entered and media_remaining. All I have is a null on the printout and in the table. Data is entered into the form via a 162 item switchboard, also via html access page.
The table has nothing in it under the media_remaining. What am I doing Wrong?
Thanks but the calculation is not done in MS Access Query but in the sorce of the form. The figure is working correctly but the first item in the form does not have an answer written to the table file. Therefore the reports printout is missing the calculations.
What is the purpose of your calculation ? Is it to give the difference on a record by record basis ? Or is it to give the overall difference of all records i.e. the total remaining ?
Either way, you should not need to store the result of such calculations into your table. This is bad practice anyway. I suspect this is what DJN is also getting at. If there is a formula in a field then it's unlikely to be bound to your table.
The principle is, wherever you want to see the result, you must create the calculation. So you will have a calculation done on the form (which works). And you will have a calculation built into your report.
If there is a report or sub-report in which each row shows a test score result, and I'd like to have a column that shows the net gain or loss from test score to test score, what is the best way to do that? There is only a single field in the detail section that comes from the query. But I'd like to have a field next to it that shows the + or - from the row above (if there's more than one row). Is there a way to do this in Access?