J
J. Trucking
Hello,
I need some help. I have two tables. One which houses individual
fuel entries and another which houses the monthly recepit values
received from the fuel supplier. I will display some sample data
below:
Sample Individual data (each group of data is an individual record)
Date: Feb 1, 2007
Employee: Tom
Unit Number: 200
Fuel Key Number: A2
Fuel System: Keylock
Number of Liters: 127
Date:Feb 3, 2007
Employee: Joe
Unit Number 187
Fuel Key Number: A1
Fuel System: Keylock
Number of Liters: 145
Date: Feb 8, 2007
Employee: John
Unit Number: 100
Fuel Key Number: 3478
Fuel System: Cardlock
Number of Liters 346
I have 30 employees and two different types of fuel systems (Cardlock
and keylock in two different locations). Each time they fuel up, they
write down how much they take and it is recorded in a table by a data
entry person. At the end of the month, our supplier gives us a
monthly total (ie) Key A1 used 4000 Liters for the month of February
2007, and Key A2 used 3201 Liters, Cardlock 3479 took 2000 Liters. I
store this information in a different table (because there are a lot
of keys/Cards). The data looks like this:
Month: February
Year: 2007
A1: 4000
A2: 3201
Card 3478: 2000
.... All the way up to 30 keys/cards. I have another tab on this form
to which I assign an operator to each key/card. This information only
changes if someone quits, etc. So on the second tab, I have:
A1Operator: Joe
A2Operator: Tom
....All the way up to 30 different operators
In the individual entries (the first set of data), I can have up to
about 200 entries per month. What I need is a query which will
display a summary of the key/card useage for any month. For example,
I would like to know that Key A1 had a total of 4006 Liters taken
based on a summation of the individual records and that compares to
4000 Liters given by our supplier for a difference of 6 Liters. I
would like to group by each key/card. I would like to display the sum
only and not each individual record. I would like to show the key
number, employee using that key, the amount based on the individual
records, the amount based on the supplier, and the difference between
the two in a report. Can anyone help get me started. I am mostly
confused on how I sum the records and show only the sum and not the
individual records. As well, how i link the two tables in the same
query because the month end info from the supplier is in a different
table than the individual records. As well, I should mention that the
date format in the "Individual records" is mm/dd/yy and is simply
"January" and "2007" in the summation table. Any suggestions to get
me started? Any help would be greatly appreciated. Have a great
weekend.
Thanks,
John
I need some help. I have two tables. One which houses individual
fuel entries and another which houses the monthly recepit values
received from the fuel supplier. I will display some sample data
below:
Sample Individual data (each group of data is an individual record)
Date: Feb 1, 2007
Employee: Tom
Unit Number: 200
Fuel Key Number: A2
Fuel System: Keylock
Number of Liters: 127
Date:Feb 3, 2007
Employee: Joe
Unit Number 187
Fuel Key Number: A1
Fuel System: Keylock
Number of Liters: 145
Date: Feb 8, 2007
Employee: John
Unit Number: 100
Fuel Key Number: 3478
Fuel System: Cardlock
Number of Liters 346
I have 30 employees and two different types of fuel systems (Cardlock
and keylock in two different locations). Each time they fuel up, they
write down how much they take and it is recorded in a table by a data
entry person. At the end of the month, our supplier gives us a
monthly total (ie) Key A1 used 4000 Liters for the month of February
2007, and Key A2 used 3201 Liters, Cardlock 3479 took 2000 Liters. I
store this information in a different table (because there are a lot
of keys/Cards). The data looks like this:
Month: February
Year: 2007
A1: 4000
A2: 3201
Card 3478: 2000
.... All the way up to 30 keys/cards. I have another tab on this form
to which I assign an operator to each key/card. This information only
changes if someone quits, etc. So on the second tab, I have:
A1Operator: Joe
A2Operator: Tom
....All the way up to 30 different operators
In the individual entries (the first set of data), I can have up to
about 200 entries per month. What I need is a query which will
display a summary of the key/card useage for any month. For example,
I would like to know that Key A1 had a total of 4006 Liters taken
based on a summation of the individual records and that compares to
4000 Liters given by our supplier for a difference of 6 Liters. I
would like to group by each key/card. I would like to display the sum
only and not each individual record. I would like to show the key
number, employee using that key, the amount based on the individual
records, the amount based on the supplier, and the difference between
the two in a report. Can anyone help get me started. I am mostly
confused on how I sum the records and show only the sum and not the
individual records. As well, how i link the two tables in the same
query because the month end info from the supplier is in a different
table than the individual records. As well, I should mention that the
date format in the "Individual records" is mm/dd/yy and is simply
"January" and "2007" in the summation table. Any suggestions to get
me started? Any help would be greatly appreciated. Have a great
weekend.
Thanks,
John