I have a query that has InspID, InspDate, NextInspDate, Emissions (calculated by multiplying timeelapsed by associated InspDate Result)
I have another query based off this query that sums the Emissions between two selected dates. This works fine as long as the dates I select are actual InspDates which are random. However if I want a clean sum period (Jan 1, 2007-Dec 31,2007) It only sums the emissions that have an Inspdate after Jan 1. Therefore, if I have an inspection on Dec 28, 2006 and Jan 5, 2007, the query will not count any emisisons for Jan 1-5.
When this happens I need the query to lookup the [result] value of the previous InspDate and multiply it by the [timeelapsed] between the [selecteddate] and the [NextInspDate].
What is the best way to retrieve this information?
Thanks
I have another query based off this query that sums the Emissions between two selected dates. This works fine as long as the dates I select are actual InspDates which are random. However if I want a clean sum period (Jan 1, 2007-Dec 31,2007) It only sums the emissions that have an Inspdate after Jan 1. Therefore, if I have an inspection on Dec 28, 2006 and Jan 5, 2007, the query will not count any emisisons for Jan 1-5.
When this happens I need the query to lookup the [result] value of the previous InspDate and multiply it by the [timeelapsed] between the [selecteddate] and the [NextInspDate].
What is the best way to retrieve this information?
Thanks