Simple "Month End" (1 Viewer)

Mark Liddle

Registered User.
Local time
Today, 23:47
Joined
Sep 12, 2000
Messages
13
I am constructing a database that keeps a records of the hours worked as well as the repair & maintenance costs for forklift vehicles in the company.
The idea being that at the end of each month the system generates a report that will identify the running cost per hour for each vehicle.

I am having difficulty with a particular report because the "hours" (Running time) is neither recorded from one repair job to the next, nor on a daily basis. Rather the hour meter is read on the first day of each month. Needless to say that the running hours is then calculated as :
latest reading - last months reading = hours worked for the month.

I have therefor split the data into 2 tables (That I am concerned about right now.) as follows.

tblVehicleHours
FleetNo Vehicles Fleet Number
Year Year being assessed
Month Month being assessed
StartHours Hour reading at the begining of the month
EndHours Hour reading at the end of the month
TotRepair Total cost of the repairs for the month

tblRepairs
FleetNo Vehicles Fleet Number
RepDate Date of the repair
RepType Type of repair (I.E. Service, Maintenance, Abuse, Tyres ETC)
Labour Labour hours
Amount Cost of the repair

My question is:
How do I add up the cost of the repairs (per vehicle / month) in the tblRepairs and transfer that total into the tblVehicleHours so that I can get my summary report.

I want to be able to click a button and let the system do the job, rather than update each vehicle individually.
 

A real begineer

Registered User.
Local time
Today, 23:47
Joined
Nov 4, 2000
Messages
74
Mark, this type of work is handled by a query, and is best handled by a query.
 

Users who are viewing this thread

Top Bottom