J
J. Trucking
Hello,
I have a database which fuel records are stored in. The data is
stored in two tables. The first records the daily logs that operators
use each time they fuel up. It stores their name, the key they used
(keylock fuel system - it's ancient) the unit number of the equipment
using the fuel, and the amount of fuel they took. The second table
stores the month end information retrieved from the key lock print
out. It keeps a running total of the amount of fuel taken with each
key, and the operator using that key.
We have problems making sure all of the fuel is accounted for each
month so we like doing a comparison of how much each operator recorded
for the month vs. what the print out says. You would be surpsrised at
the differences. Anyways, I am beginning to build a query which would
report the required information. I started out by building a form to
which the user can enter in the dates they want to search between (I
would have rather just had them enter in the month and year but I
couldnt figure out how to search on that). I used a "between"
statement on the query and it works quite well. This is where I get
stuck. I have a couple of questions so I will write them
individually:
1. I would now like the query to look through the records between the
specified dates and summarize the amount each employee recorded. For
example, John Doe may have filled up nine times during the month. I
dont care about the individual times, just his total for the month.
This data is in one table.
2. In the other table (the month end keylock print out), I need to be
able to calculate the difference between the total recorded for each
key in the specified month, versus the total the month before. The
keylock system simply has a rolling meter so it's always the total
amount ever pumped. For example, at the end of May, Key A4 could read
1000 Litres. At the end of June, if it reads 1400 Litres, I know that
400 Litres was used in June. The used inputs this information in a
form and the date is reference by the field "month" and "year".
I will then use a report to calculate the difference between the sum
of the operator's log information for the month, and the month end
print out. Does anyone have any ideas on how to accomplish this?
Thanks in advance,
John
I have a database which fuel records are stored in. The data is
stored in two tables. The first records the daily logs that operators
use each time they fuel up. It stores their name, the key they used
(keylock fuel system - it's ancient) the unit number of the equipment
using the fuel, and the amount of fuel they took. The second table
stores the month end information retrieved from the key lock print
out. It keeps a running total of the amount of fuel taken with each
key, and the operator using that key.
We have problems making sure all of the fuel is accounted for each
month so we like doing a comparison of how much each operator recorded
for the month vs. what the print out says. You would be surpsrised at
the differences. Anyways, I am beginning to build a query which would
report the required information. I started out by building a form to
which the user can enter in the dates they want to search between (I
would have rather just had them enter in the month and year but I
couldnt figure out how to search on that). I used a "between"
statement on the query and it works quite well. This is where I get
stuck. I have a couple of questions so I will write them
individually:
1. I would now like the query to look through the records between the
specified dates and summarize the amount each employee recorded. For
example, John Doe may have filled up nine times during the month. I
dont care about the individual times, just his total for the month.
This data is in one table.
2. In the other table (the month end keylock print out), I need to be
able to calculate the difference between the total recorded for each
key in the specified month, versus the total the month before. The
keylock system simply has a rolling meter so it's always the total
amount ever pumped. For example, at the end of May, Key A4 could read
1000 Litres. At the end of June, if it reads 1400 Litres, I know that
400 Litres was used in June. The used inputs this information in a
form and the date is reference by the field "month" and "year".
I will then use a report to calculate the difference between the sum
of the operator's log information for the month, and the month end
print out. Does anyone have any ideas on how to accomplish this?
Thanks in advance,
John