G
Guest
I've search the boards and cannot find an answer to this one.
I have a table set up as follows:
Autonum Unit # H Date Hours
1 103 1/1/2007 2000
4 202 1/1/2007 1500
7 301 1/2/2007 1000
2 103 1/8/2007 2090
5 202 1/8/2007 1600
8 301 1/9/2007 1200
3 103 1/15/2007 2180
6 202 1/15/2007 1700
9 301 1/16/2007 14000
I need to be able to calculate the difference of the most current reading
for each unit # from the next to last reading. For instance, on unit # 301,
I need a query to give me a figure of 12800 (14000 - 1200). As new records
are added, this figure would need to change. I've come up with a few
solutions employing a linked Excel spreadsheet, however it doesn't take into
account the mixed sequence of the data, so when a new record is added, it
does not calculate properly. I've thought of giving each unit it's own
table, but I can't see how to join them together in a query. A junction
table, perhaps? Hope I explained this sufficiently. Any help would be
greatly appreciated.
Chuck
I have a table set up as follows:
Autonum Unit # H Date Hours
1 103 1/1/2007 2000
4 202 1/1/2007 1500
7 301 1/2/2007 1000
2 103 1/8/2007 2090
5 202 1/8/2007 1600
8 301 1/9/2007 1200
3 103 1/15/2007 2180
6 202 1/15/2007 1700
9 301 1/16/2007 14000
I need to be able to calculate the difference of the most current reading
for each unit # from the next to last reading. For instance, on unit # 301,
I need a query to give me a figure of 12800 (14000 - 1200). As new records
are added, this figure would need to change. I've come up with a few
solutions employing a linked Excel spreadsheet, however it doesn't take into
account the mixed sequence of the data, so when a new record is added, it
does not calculate properly. I've thought of giving each unit it's own
table, but I can't see how to join them together in a query. A junction
table, perhaps? Hope I explained this sufficiently. Any help would be
greatly appreciated.
Chuck