B
Bob Martin
I have a project where I need to calculate the difference
between the current record (which is an odometer reading)
and the prior record for 200+ vehicles.
I've tried using the following Dlookup formula:
PREV: DMax("[Odometer]", "[tablename]", "[VehID] = " &
[VehID] & " AND [Odometer] < " & [Odometer])
The DMax formula produces the following information:
Date VehID Odometer PREV
1/1/04 007 12919 12800
2/1/04 007 12941 12919
3/1/04 007 12941 12919
3/15/04 007 13500 12941
The problem is the number we need for the PREV on 3/1/04
is 12941 not 12919.
(I experience the same problem when I used the solution
presented in Microsoft Knowledge Base Article - 120273.)
How can I get the reading to remain the same if the
vehicle has not been used during the period?
The overall result that I am looking for is to calculate
how much each vehicle was used in the period.
Can anyone help me resolve this problem? I am using
Access97.
between the current record (which is an odometer reading)
and the prior record for 200+ vehicles.
I've tried using the following Dlookup formula:
PREV: DMax("[Odometer]", "[tablename]", "[VehID] = " &
[VehID] & " AND [Odometer] < " & [Odometer])
The DMax formula produces the following information:
Date VehID Odometer PREV
1/1/04 007 12919 12800
2/1/04 007 12941 12919
3/1/04 007 12941 12919
3/15/04 007 13500 12941
The problem is the number we need for the PREV on 3/1/04
is 12941 not 12919.
(I experience the same problem when I used the solution
presented in Microsoft Knowledge Base Article - 120273.)
How can I get the reading to remain the same if the
vehicle has not been used during the period?
The overall result that I am looking for is to calculate
how much each vehicle was used in the period.
Can anyone help me resolve this problem? I am using
Access97.