I need to find a range of data in a recordset. I have the following code
The first .FindFirst works, but not the second one! I have figured out that it has someting to do with the dteStart criteria because
.FindFirst ("DateTime > #" & dteStart & "#") also does not work
What am I doing wrong?
Once I have the date range, how can I search for the maximum Reading in the date range using the same recordset?
Many thanks in advance
Code:
.FindFirst ("Reading > " & LowerLimit)
If .NoMatch Then
MsgBox ("No Records Found!")
Else
dteStart = rstData!DateTime
End If
.FindFirst ("Reading <= " & LowerLimit & " and DateTime > #" & dteStart & "#")
The first .FindFirst works, but not the second one! I have figured out that it has someting to do with the dteStart criteria because
.FindFirst ("DateTime > #" & dteStart & "#") also does not work
What am I doing wrong?
Once I have the date range, how can I search for the maximum Reading in the date range using the same recordset?
Many thanks in advance