End Date Error

johnsqftwr

Registered User.
Local time
Today, 00:35
Joined
Jul 19, 2004
Messages
29
All,

I have a form from which you can select the start date and end date to then open a report based on this criteria.

The source of the report is:
SELECT CallLogRef, CallDateTime, WarehouseNo, DCEmployee_No, First_Name, Last_Name, CallReason, ReasonDescription, CallLog FROM qryCallLogsUnion WHERE ((CallDateTime) >= Forms!frmSelectReports!txtStartDate AND (CallDateTime) <= Forms!frmSelectReports!txtEndDate);

The start date of the report is OK but the end date is 1 day short.
For example:
Start Date 8/07/09 End Date 10/07/09 produces a report from 08/07/09 to 09/07/09.

Many thanks

John
 
Try using Between .... And ....

David
 
If CallDateTime is stored as both the date and time, then when you use a short date it will tack on 00:00:01 as the default time so it can compare the values correctly. Either add 1 to the end date criteria, or add in 12:59:59 PM to it.
 

Users who are viewing this thread

Back
Top Bottom