P
PamB
Hi everyone,
I really need help please. I apologise in advance if my description is
difficult to follow. I am very new to Access and have the following problem:
Table 1 consists of:
Machine ID (from another table)
Downtime (calculated in queries from DateDiff expression based on Start Date
& Time and End Date & Time)
this table also has a few other fields - descriptive mainly
This table is designed to track the amount of downtime for each machine and
does so quite well, and even when there are multiple incidences of downtime
in a day. It is for Daily entries as required.
Table 2 consists of:
Machine ID (from the same table as table 1 gets it)
Start Date
Start Hours
End Date
End Hours
Planned Hours (for the above period)
Wet Weather Hours (for the above period)
I am able to enter Start, End, Planned and Wet Weather Hours on a weekly
basis and run appropriate queries / reports to give me 'Actual Hours worked'
based on Start and End Hours etc.
I would now like to perform some calculations such as:
(Planned Hours for period - Downtime (for same period)) / Planned Hours for
period
or something like
Actual Hours Worked / (Planned Hours - Downtime)
I would also like the above calculations to include 'wet weather' in the
'downtime' bit.
I have tried lots of different ways to link the tables together but nothing
so far has worked and I'm simply getting more confused and frustrated. The
best I have managed is to do an outer join query on each of the tables, then
put these two queries into a new query. This returns me the correct count of
results, but where there are multiple entries of 'downtime' from the first
table on the same day, the 'actual', 'planned' and 'wet' repeat across the
downtime records (or vice versa, depending on the join type).
Also, if no Start or End Hours for a machine have been entered in the 2nd
table, the Downtime entry/s don't show at all.
Is there an easier way to accomplish what I am attempting? Any help would be
greatly appreciated.
Thank you.
I really need help please. I apologise in advance if my description is
difficult to follow. I am very new to Access and have the following problem:
Table 1 consists of:
Machine ID (from another table)
Downtime (calculated in queries from DateDiff expression based on Start Date
& Time and End Date & Time)
this table also has a few other fields - descriptive mainly
This table is designed to track the amount of downtime for each machine and
does so quite well, and even when there are multiple incidences of downtime
in a day. It is for Daily entries as required.
Table 2 consists of:
Machine ID (from the same table as table 1 gets it)
Start Date
Start Hours
End Date
End Hours
Planned Hours (for the above period)
Wet Weather Hours (for the above period)
I am able to enter Start, End, Planned and Wet Weather Hours on a weekly
basis and run appropriate queries / reports to give me 'Actual Hours worked'
based on Start and End Hours etc.
I would now like to perform some calculations such as:
(Planned Hours for period - Downtime (for same period)) / Planned Hours for
period
or something like
Actual Hours Worked / (Planned Hours - Downtime)
I would also like the above calculations to include 'wet weather' in the
'downtime' bit.
I have tried lots of different ways to link the tables together but nothing
so far has worked and I'm simply getting more confused and frustrated. The
best I have managed is to do an outer join query on each of the tables, then
put these two queries into a new query. This returns me the correct count of
results, but where there are multiple entries of 'downtime' from the first
table on the same day, the 'actual', 'planned' and 'wet' repeat across the
downtime records (or vice versa, depending on the join type).
Also, if no Start or End Hours for a machine have been entered in the 2nd
table, the Downtime entry/s don't show at all.
Is there an easier way to accomplish what I am attempting? Any help would be
greatly appreciated.
Thank you.