My main data table is populated in part by a number of cbo's that pull data from a lookup table. I'm trying to build a query that will be used for a report listing all records within a date range.
IOW, all I want the query to do is list all records within the date range. However, it keeps filtering the records by more than that and I don't understand why.
Here's my sql:
SELECT tblWARNData.NoticeNo, tblWARNData.EntryDate, tblWARNData.CoName, tblLookupData.LUDescr AS [Incident Descr], tblLookupData_1.LUDescr AS [Notif Descr], tblLookupData_2.LUDescr AS [Layoff Reason 1], tblLookupData_3.LUDescr AS [Layoff Reason 2], tblWARNData.RespType
FROM (((tblWARNData INNER JOIN tblLookupData ON tblWARNData.IncidType = tblLookupData.LookupID) INNER JOIN tblLookupData AS tblLookupData_1 ON tblWARNData.NotifType = tblLookupData_1.LookupID) INNER JOIN tblLookupData AS tblLookupData_2 ON tblWARNData.LayfReas1 = tblLookupData_2.LookupID) INNER JOIN tblLookupData AS tblLookupData_3 ON tblWARNData.LayfReas2 = tblLookupData_3.LookupID
WHERE (((tblWARNData.EntryDate) Between CDate([forms]![frmRptCriteria]![txtBeginDate]) And CDate([Forms]![frmRptCriteria]![txtEndDate])));
IOW, all I want the query to do is list all records within the date range. However, it keeps filtering the records by more than that and I don't understand why.
Here's my sql:
SELECT tblWARNData.NoticeNo, tblWARNData.EntryDate, tblWARNData.CoName, tblLookupData.LUDescr AS [Incident Descr], tblLookupData_1.LUDescr AS [Notif Descr], tblLookupData_2.LUDescr AS [Layoff Reason 1], tblLookupData_3.LUDescr AS [Layoff Reason 2], tblWARNData.RespType
FROM (((tblWARNData INNER JOIN tblLookupData ON tblWARNData.IncidType = tblLookupData.LookupID) INNER JOIN tblLookupData AS tblLookupData_1 ON tblWARNData.NotifType = tblLookupData_1.LookupID) INNER JOIN tblLookupData AS tblLookupData_2 ON tblWARNData.LayfReas1 = tblLookupData_2.LookupID) INNER JOIN tblLookupData AS tblLookupData_3 ON tblWARNData.LayfReas2 = tblLookupData_3.LookupID
WHERE (((tblWARNData.EntryDate) Between CDate([forms]![frmRptCriteria]![txtBeginDate]) And CDate([Forms]![frmRptCriteria]![txtEndDate])));