1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Microsoft Access not pulling incorrect data

Discussion in 'All Other Software' started by MarkNie, Feb 8, 2007.

Thread Status:
Not open for further replies.
  1. MarkNie

    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
     
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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/542243

  1. 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.
    Dismiss Notice