Has anyone come across these commands that return different results with the same query condition
CODE SECTION
-----------------
rdates(1) = a date defined by the user
rdates(2) = calculated date based on a rule - which is always the lesser of the two dates
* sum the values between these dates
CALCULATE SUM(hrs_driving+hrs_onduty) TO Results(1) ;
FOR logs.employee_code = THISFORM.EMPLOYEE_CODE1.Text1.VALUE ;
AND BETWEEN(logs.txdate,rdates(2),rdates(1))
* sum the values between these dates
SELECT SUM(hrs_driving+hrs_onduty) AS 'results1' ;
FROM logs!logs INTO CURSOR 'test1' ;
WHERE logs.employee_code = THISFORM.EMPLOYEE_CODE1.Text1.VALUE ;
AND BETWEEN(logs.txdate,rdates(2),rdates(1))
-----------------
The results are :
Calculate sum() = 73.5
SQL sum() = 63.00
IF ANY ONE CAN SPOT THE PROBLEM PLEASE LET ME KNOW...
TIA
Shawn