Hello:
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 !!