SELECT tbl_期初表.客户编号, tbl_期初表.日期,tbl_期初表.摘要,tbl_期初表.金额 as 金额,"期初余额" as 备注,"产品编号" as 产品编号
FROM tbl_期初表;
UNION SELECT tbl_出库单.客户编号, tbl_出库单.日期,tbl_出库单.摘要,[tbl_出库单明细]![单价]*[tbl_出库单明细]![数量] AS 金额 ,"借方" as 备注,tbl_出库单明细.产品编号
FROM tbl_出库单 INNER JOIN tbl_出库单明细 ON tbl_出库单.出库单 = tbl_出库单明细.单号;
UNION SELECT tbl_货款表.客户编号, tbl_货款表.日期,tbl_货款表.摘要,tbl_货款表.金额 AS 金额,"贷方" as 备注,"产品编号" as 产品编号
FROM tbl_货款表;