Calculating fuel economy

G

Guest

I have a table with two columns whcih have these headings:

1) Refuel Amount (in litres)
2) Refuel Mileage (in km)

For each journey a vehicle makes, the Start and Finish mileage of the
vehcile is logged. When the vehicle requires refuelling, the amount of fuel
in litres is entered, as is the vehcicles mileage at the point of refuel.

Using a query i am trying to calculate the fuel economy of each vehicle.
Hence i need to calculate the distance that each vehicle travelled on the
amount of fuel. To do this i need to use the mileage reading at refueling,
and the previous mileage at refueling. If i subtract the higher value from
the smaller, i will get the distance travelled for the amount of fuel put in.

How do i reference two pieces of information in the formula. I can reference
the mileage at the current refueling relatively easily, but referencing the
mileage at the previous refueling is causing me a few headaches.

Can anybody help.

Thank you

Crimbo
 
J

Joseph Meehan

Crimbo said:
I have a table with two columns whcih have these headings:

1) Refuel Amount (in litres)
2) Refuel Mileage (in km)

For each journey a vehicle makes, the Start and Finish mileage of the
vehcile is logged. When the vehicle requires refuelling, the amount
of fuel in litres is entered, as is the vehcicles mileage at the
point of refuel.

Using a query i am trying to calculate the fuel economy of each
vehicle. Hence i need to calculate the distance that each vehicle
travelled on the amount of fuel. To do this i need to use the mileage
reading at refueling, and the previous mileage at refueling. If i
subtract the higher value from the smaller, i will get the distance
travelled for the amount of fuel put in.

How do i reference two pieces of information in the formula. I can
reference the mileage at the current refueling relatively easily, but
referencing the mileage at the previous refueling is causing me a few
headaches.

Can anybody help.

Thank you

Crimbo

I suggest you start by adding a date/time field. You need a way of
sorting data in chronological order and you can't count on autonumbers or
the order in which the data happens to appear in the table to do that.

Off the top of my head I can't remember to procedure to get the prior
mileage, but someone may come in with that or maybe I will take a look and
pull it off one of my projects.
 
G

Guest

Hi Joseph,

I already have a date code for each data set that i can use to order the
events.

If you come up with anything more, please let me know.

As you say, maybe someone else will help out as well.

Crimbo
 
J

James A. Fortune

Crimbo said:
I have a table with two columns whcih have these headings:

1) Refuel Amount (in litres)
2) Refuel Mileage (in km)

For each journey a vehicle makes, the Start and Finish mileage of the
vehcile is logged. When the vehicle requires refuelling, the amount of fuel
in litres is entered, as is the vehcicles mileage at the point of refuel.

Using a query i am trying to calculate the fuel economy of each vehicle.
Hence i need to calculate the distance that each vehicle travelled on the
amount of fuel. To do this i need to use the mileage reading at refueling,
and the previous mileage at refueling. If i subtract the higher value from
the smaller, i will get the distance travelled for the amount of fuel put in.

How do i reference two pieces of information in the formula. I can reference
the mileage at the current refueling relatively easily, but referencing the
mileage at the previous refueling is causing me a few headaches.

Can anybody help.

Thank you

Crimbo

I worked on something similar in:

http://groups.google.com/group/comp...c1591694fb0/9831e557fd8a55eb#9831e557fd8a55eb

Also, look at the entire thread of the first link. This should solve
your problem of referring to the previous mileage.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top