R
Rick Stahl
The following query is not working properly. The data displayed on certain
WorkEndingDates should not be returned because it is not between the
EffectiveDate and EndingDate. What is odd I am using the same subquery and
table in another query that returns the correct data within the given dates.
Any help is greatly appreciated ! Thanks.
SELECT TotalGrossWeeklyPay.dtmWorkEndingDate,
TotalGrossWeeklyPay.strFirstName, TotalGrossWeeklyPay.strLastName,
[tblNon-TaxDeductions].curOtherDeductions,
[tblNon-TaxDeductions].strComments
FROM TotalGrossWeeklyPay INNER JOIN [tblNon-TaxDeductions] ON
(TotalGrossWeeklyPay.strLastName = [tblNon-TaxDeductions].strLastName) AND
(TotalGrossWeeklyPay.strFirstName = [tblNon-TaxDeductions].strFirstName)
WHERE
(([tblNon-TaxDeductions]![dtmEffectiveDate]<=[TotalGrossWeeklyPay]![dtmWorkEndingDate]<=[tblNon-TaxDeductions]![dtmEndingDate]
And ([tblNon-TaxDeductions].curOtherDeductions) Is Not Null));
WorkEndingDates should not be returned because it is not between the
EffectiveDate and EndingDate. What is odd I am using the same subquery and
table in another query that returns the correct data within the given dates.
Any help is greatly appreciated ! Thanks.
SELECT TotalGrossWeeklyPay.dtmWorkEndingDate,
TotalGrossWeeklyPay.strFirstName, TotalGrossWeeklyPay.strLastName,
[tblNon-TaxDeductions].curOtherDeductions,
[tblNon-TaxDeductions].strComments
FROM TotalGrossWeeklyPay INNER JOIN [tblNon-TaxDeductions] ON
(TotalGrossWeeklyPay.strLastName = [tblNon-TaxDeductions].strLastName) AND
(TotalGrossWeeklyPay.strFirstName = [tblNon-TaxDeductions].strFirstName)
WHERE
(([tblNon-TaxDeductions]![dtmEffectiveDate]<=[TotalGrossWeeklyPay]![dtmWorkEndingDate]<=[tblNon-TaxDeductions]![dtmEndingDate]
And ([tblNon-TaxDeductions].curOtherDeductions) Is Not Null));