ok, let's analyse this
SELECT MAGACIN.GBR, Sum(MAGACIN.KOL) AS SumOfKOL
FROM MAGACIN
WHERE (((MAGACIN.DATA) Between #10/1/2011# And #10/31/2011#))
GROUP BY MAGACIN.GBR
HAVING (((MAGACIN.GBR)>='1002' And (MAGACIN.GBR)<='1080'));
this returns 1202 in SumOfKol instead of 1241, for gbr=1002...