M
Meter Reader
I am creating an application to calculate the water usage
at 230 locations. At each location we have a meter with
a mechanical 3-digit odometer that is read on a weekly
basis. I have created an input form for the meter reader
to input the weekly meter reading data into a table. The
table has 3 fields, MeterID, DateRead and
Meter_Reading. I have created a query to calculate the
difference between the current meter reading and the
previous meter reading. The formula I used to produce the
previous reading is as follows:
PrevReading: DMax("[Meter_Reading]","Query:
MeterReadings","[MeterID] = " & [MeterID] & " AND
[DateRead] < #" & [DateRead] & "#")
HERE'S MY DILEMMA!!??
When the 3-digit odometer on the meter rolls over (ie 999
to 000), the formula produces the Maximum Meter_Reading
for the MeterID. For example:
MeterID DateRead Meter_Reading PrevReading
001 3/1/04 950 900
001 3/7/04 5 950
001 3/14/04 60 950
Since the previous reading is incorrect my calculation
for meter usage for that period is also incorrect.
My goal is to create an input form where the meter reader
only has to input the current meter reading. To resolve
this problem, I know I can create an input form that
prompts the meter reader to input both the current meter
reading and the previous meter reading but that creates
an additional chance for a data input error.
ANY SUGGESTIONS?
at 230 locations. At each location we have a meter with
a mechanical 3-digit odometer that is read on a weekly
basis. I have created an input form for the meter reader
to input the weekly meter reading data into a table. The
table has 3 fields, MeterID, DateRead and
Meter_Reading. I have created a query to calculate the
difference between the current meter reading and the
previous meter reading. The formula I used to produce the
previous reading is as follows:
PrevReading: DMax("[Meter_Reading]","Query:
MeterReadings","[MeterID] = " & [MeterID] & " AND
[DateRead] < #" & [DateRead] & "#")
HERE'S MY DILEMMA!!??
When the 3-digit odometer on the meter rolls over (ie 999
to 000), the formula produces the Maximum Meter_Reading
for the MeterID. For example:
MeterID DateRead Meter_Reading PrevReading
001 3/1/04 950 900
001 3/7/04 5 950
001 3/14/04 60 950
Since the previous reading is incorrect my calculation
for meter usage for that period is also incorrect.
My goal is to create an input form where the meter reader
only has to input the current meter reading. To resolve
this problem, I know I can create an input form that
prompts the meter reader to input both the current meter
reading and the previous meter reading but that creates
an additional chance for a data input error.
ANY SUGGESTIONS?