Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012

    Unanswered: Counts number of days


    I have a table tblCallLog which has a field called "Calldate".

    I need to calculate number of counts of days which meets the following condition: Currentdate - Calldate <= 60

    This is the Sql "qryPhone1calllog" I tried but it does not work..

    SELECT tblCallLog.CCSSID, tblCallLog.CallPhone1 AS Phone, tblCallLog.Day, tblCallLog.calldate,tblCallLog.LM, tblCallLog.notes, IIf((Date()-[calldate])<=60,[calldate],Null) AS PhoneC, tblCallLog.AppointAmPm, tblCallLog.CallType
    FROM tblCCSSExpansionTrackingMain AS M LEFT JOIN tblCallLog ON [M].CCSSID=tblCallLog.CCSSID
    WHERE (((tblCallLog.CallPhone1)=Forms![frmCallTrack-Cases]!CONTPHONE1) And ((M.CCSSID)=Forms![frmCallTrack-Cases]!CCSSID))
    ORDER BY tblCallLog.Seq_Num;

    and in the controlsource propoerty I mentioned =DCount("[PhoneC]","qryPhone1CallLog","CCSSID=Forms![frmCallTrack-Cases]!CCSSID")

    Can you let me know the issue ? Thanks !!

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 14
    Search in Access help for how to use the DateDiff function.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts