SELECT IA_Summary.iMonth AS 会计期间, nz(DSum("[iMoney]","IA_Summary","[iMonth]=" & [会计期间]-1),0) AS 上月结存, Sum(IA_Summary.iIMoney) AS 本月收入金额, Sum(IA_Summary.iOMoney) AS 本月发出金额, Sum(IA_Summary.iMoney) AS 本月结存金额
FROM IA_Summary INNER JOIN IA_Summary AS IA_Summary_1 ON IA_Summary.AutoID = IA_Summary_1.AutoID
GROUP BY IA_Summary.iMonth;