View Full Version : using data from previous record


henryUK
04-02-2005, 02:36 AM
I'm a novice with Access but I thought I would use Access rather than Excel to record fuel use for our vehicles because the reporting functions should be more powerful.

I have set up a table where I input date, vehicle, member of staff, mileage of the vehicle and the cumulative reading from the fuel tank meter. I thought it should be simple enough to calculate the fuel used each fill by taking the meter reading away from the reading on the previous record, but I cannot find a way of getting Access to do this.

I am missing something obvious or not?

Thanks,

Henry

pbaldy
04-02-2005, 12:06 PM
Personally, I would store the gallons for each transaction, as it would be easier to sum them up later, by vehicle/date/whatever (to me, your method reflects Excel design thinking, which doesn't often translate well to Access). However, if you want to stick with your method, you should be able to get the reading from the previous transaction with this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;210504