Microsoft Access not pulling incorrect data

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

MarkNie

Thread Starter
Joined
Feb 8, 2007
Messages
1
Hi All

Your help in this will be greatly appreciated, been racking my brain but just can't figure it out.

Query:

SELECT tblTracking.PortfolioCode, tblTracking.[CRG Deadline], IIf(IsNull(qrybDistributionDeadline.Date),Null,CDate(CLng(qrybDistributionDeadline.Date))) AS D_Date, Count(*) AS [CountOfCRG Deadline], tblTracking.ProductType
FROM tblTracking AS tblTracking LEFT JOIN qrybDistributionDeadline AS qrybDistributionDeadline ON tblTracking.TrackingID = qrybDistributionDeadline.TrackingID
WHERE Not ( tblTracking.PortfolioCode In("630541","630542"))
AND tblTracking.[CRG Deadline] tblTracking.[CRG Deadline] OR qrybDistributionDeadline.Date Is Null)
GROUP BY tblTracking.PortfolioCode, tblTracking.[CRG Deadline], IIf(IsNull(qrybDistributionDeadline.Date),Null,CDate(CLng(qrybDistributionDeadline.Date))), tblTracking.ProductType
ORDER BY tblTracking.PortfolioCode;

The Story:

I am trying to run daily report which show me all the reports that are not signed off or late, I did this buy creating a query which checks the dates of the 2 tables.
CRG Deadline is the date which the report is suppost to be signed off by.
qrybDistributionDeadline.Date is the date that the user signed off the report.

It seems to be working at first glance but then I saw that when the qrybDistributionDeadline.Date = 01/02/2007 12:00:00 or later it changed the date to the following day. Any help with this will be greatly appreciated.

Thanks
Regards
Mark
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top