Try changing strSQL to the following:
[code] strSQL = "SELECT [courier query].* FROM [courier query]
WHERE date BETWEEN #" & strFrom & "# AND #" &
strTo & "#" [\code]
This should work. The brackets around the Select statement followed...
If your recordset is called rsABC, then do this:
rsABC.MoveLast
rsABC.MoveFirst
RecordCount = rs.RecordCount
I don't believe you need the MoveFirst and MoveLast commands if you're using ADO.
Hope that helps.
The problem here is with the test for 12:01am. This loop will immediately fall through because the current time actually is > 12:01am (of today, not tomorrow). The only time this will loop is between 12:00am and 12:01am -- all other times are > 12:01am.
In order to make time tests like this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.