473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Fuel tracking in vehicle database

Hello all, I use Access to keep track of approx. 80 vehicles.
I have a table of vehicles with specs.
I have another of service records linked to the vehicle table.
Works great! I can expand each vehicle to see what service I have performed
on just that vehicle.
I also have tables for billing categories, employees and departments.

So far so good.
Now I need to make it to where I can enter the fuel used by each vehicle
when someone fills it up.
I am having trouble figuring out how to total the amounts.
Do I need a table just for fuel entries, then a query to total it or what?

In the end what I would like is to have a form for entering the vehicle#,
amount, date, driver, mileage.
Then have it figure each month the miles driven, fuel used, and mpg.

Any help would be greatly appreciated.

Nov 13 '05 #1
2 6254
see reply in comp.database.ms-access

--

Ken Snell
<MS ACCESS MVP>

"noname" <no*************@nospam.net> wrote in message
news:li*******************@fe03.lga...
Hello all, I use Access to keep track of approx. 80 vehicles.
I have a table of vehicles with specs.
I have another of service records linked to the vehicle table.
Works great! I can expand each vehicle to see what service I have
performed
on just that vehicle.
I also have tables for billing categories, employees and departments.

So far so good.
Now I need to make it to where I can enter the fuel used by each vehicle
when someone fills it up.
I am having trouble figuring out how to total the amounts.
Do I need a table just for fuel entries, then a query to total it or what?

In the end what I would like is to have a form for entering the vehicle#,
amount, date, driver, mileage.
Then have it figure each month the miles driven, fuel used, and mpg.

Any help would be greatly appreciated.

Nov 13 '05 #2
Yes, use a separate table for your fuel entries. As you note, you'll want
fields in that table that identify the vehicle (will be a foreign key back
to your vehicles table), the driver (probably a foreign key back to your
Drivers table), etc. Each record in the table will be a single refueling of
that vehicle.

Then you'll need to write queries to get the data you wish. You likely will
need to use a subquery if you want to "calculate" the miles driven since the
last refueling, where the subquery would return the mileage number from the
record whose date is the one most previous to the date of the current
(essentially, the Max date where the date is < the date of the current
record).
--

Ken Snell
<MS ACCESS MVP>

"noname" <no*************@nospam.net> wrote in message
news:li*******************@fe03.lga...
Hello all, I use Access to keep track of approx. 80 vehicles.
I have a table of vehicles with specs.
I have another of service records linked to the vehicle table.
Works great! I can expand each vehicle to see what service I have
performed
on just that vehicle.
I also have tables for billing categories, employees and departments.

So far so good.
Now I need to make it to where I can enter the fuel used by each vehicle
when someone fills it up.
I am having trouble figuring out how to total the amounts.
Do I need a table just for fuel entries, then a query to total it or what?

In the end what I would like is to have a form for entering the vehicle#,
amount, date, driver, mileage.
Then have it figure each month the miles driven, fuel used, and mpg.

Any help would be greatly appreciated.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: hawkon | last post by:
Hi all, I have an important question to ask about how to trap events when the user close the browser window. I'm a ASP programmer and I have s MSSQL database with a user table where I'm able to...
1
by: Johann Blake | last post by:
You can read an article on a novel approach on how to build an inexpensive system to track a vehicle or any other type of object using a GPS receiver and other off-the-shelf hardware like a...
6
by: jimfortune | last post by:
In: http://groups.google.com/group/comp.databases.ms-access/msg/60d7faa790c65db1 james.ea...@gmail.com said: :Ok, I've answered the first half of my own question. From a MSDN :article, I...
35
by: javelin | last post by:
I posted an answer to someone's question, and realized I have more questions than answers. Thus, I am going to post my scenario to get to the question that I have: I have a challenge, to figure...
2
by: C# programmer | last post by:
Hi All, I'm working on a project which requires tracking of recent document downloads. There is a feature in which user can download the docs without logining into the website for some of the...
6
by: xdeath | last post by:
Hi guys, at the moment, im rushing to get my assignment done as the dateline is soon. Haven't had much time lately, so i'm in need of some help. Im supposed to create a program that : Has a...
2
by: Warren Hoskins | last post by:
I'm going to have to break this up into files however I receiving errors when I try to compile this. I am confused about this program Please help.I.m using Visual C++ platform, XP operating system ...
0
by: victory_forever_83 | last post by:
HI Do you have a car ? Does gas and fuel price driving you crazy ? Do you want to SAVE 60% of your car fuel ? Do you want to help solve the Global Warming problem ? if yes
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.