S
SuzyQ
I need some help on how to go about creating a report of miles per gallon for
each vehicle the county owns.
We have 4 road districts, so the report will be gouped by district. Each
vehicle number (EquipmentCode) is tied to a district so I can look at the
Vehicle inventory table to determine which district the vehicle belongs to.
My fuel/mileage table looks like this
EquipmentCode - text (5) - foreign key from
FillDate - Date
InventoryID - long (foreign key - to determine which tank the fuel was taken
from for inventory purposes)
Fuel- Text (will contain either "Unleaded" or "Diesel" will be entered
automatically if taken from inventory (inventoryID combo box column) or will
be selected by the user from the value list if purchased)
FuelGallons - double
EquipmentMileage - double
CostPerGal - double (will be entered automatically if taken from inventory
(inventoryID combo box column - avg of inventory cost) or will be entered by
user acutal purchase price if purchased)
InventoryDeducted - boolean
EquipmentFuelID - autonumber - primary key
What I want to do is for a specified date range I want to calculate miles
per gallon, but my dilema is that for the first record in the range, I need
to ignore the number of gallons to accurately determine MPG. Is there an
easy way to do this?
each vehicle the county owns.
We have 4 road districts, so the report will be gouped by district. Each
vehicle number (EquipmentCode) is tied to a district so I can look at the
Vehicle inventory table to determine which district the vehicle belongs to.
My fuel/mileage table looks like this
EquipmentCode - text (5) - foreign key from
FillDate - Date
InventoryID - long (foreign key - to determine which tank the fuel was taken
from for inventory purposes)
Fuel- Text (will contain either "Unleaded" or "Diesel" will be entered
automatically if taken from inventory (inventoryID combo box column) or will
be selected by the user from the value list if purchased)
FuelGallons - double
EquipmentMileage - double
CostPerGal - double (will be entered automatically if taken from inventory
(inventoryID combo box column - avg of inventory cost) or will be entered by
user acutal purchase price if purchased)
InventoryDeducted - boolean
EquipmentFuelID - autonumber - primary key
What I want to do is for a specified date range I want to calculate miles
per gallon, but my dilema is that for the first record in the range, I need
to ignore the number of gallons to accurately determine MPG. Is there an
easy way to do this?