dinhxuanthao > 25-06-18, 11:20 AM
ongke0711 > 25-06-18, 09:56 PM
SELECT QSouce_Thu_nop.NgayThu_Tra, CDbl(Nz((SELECT Sum(Nz(Prev.nhap)) - Sum(Nz(Prev.xuat))
FROM QSouce_Thu_nop AS Prev WHERE Prev.NgayThu_Tra<QSouce_Thu_nop.NgayThu_Tra GROUP BY QSouce_Thu_nop.NgayThu_Tra),0)) AS TonDau, Sum(Nz([nhap])) AS Thu, Sum(Nz([xuat])) AS Chi, [TonDau]+[Thu]-[Chi] AS TonCuoi
FROM QSouce_Thu_nop
GROUP BY QSouce_Thu_nop.NgayThu_Tra
HAVING (((QSouce_Thu_nop.NgayThu_Tra) Between [forms]![bcthunop]![t_tngay] And [forms]![bcthunop]![t_dngay]));
Xuân Thanh > 09-07-18, 11:54 AM