I am setting up a database to track my fuel useage versus miles driven.
I have a fuel transactions table that records the transaction date, vehicle number, odometer reading, and gallons pumped.
eg
TrxDate VehNo Odometer Gallons Pumped
1/11/05 222 15000 5
2/11/05 222 15060 10
3/11/05 222 15090 10
I need to crate a report that gives me miles per gallon for each transaction.
In order to get this I need to be able to subtract the previous records odometer reading from the current records odometer reading. This will give me the miles travelled between readings.
My question is: How do I get the system to pick up the previous reading for a specific vehicle from the fuel transactions table?
Please help.
Thanks in advance,
Mark
I have a fuel transactions table that records the transaction date, vehicle number, odometer reading, and gallons pumped.
eg
TrxDate VehNo Odometer Gallons Pumped
1/11/05 222 15000 5
2/11/05 222 15060 10
3/11/05 222 15090 10
I need to crate a report that gives me miles per gallon for each transaction.
In order to get this I need to be able to subtract the previous records odometer reading from the current records odometer reading. This will give me the miles travelled between readings.
My question is: How do I get the system to pick up the previous reading for a specific vehicle from the fuel transactions table?
Please help.
Thanks in advance,
Mark