你们为什么不尝试一下呢?access查询支持参数接口,支持同时运行多个sql语句,
看看帮助也好啊.不行就打开一个查询,右键单击后菜单选择查询类型->参数...
例如我写的一个查询:
PARAMETERS 期初日期 DateTime, 期末日期 DateTime, 锁定类别 Text ( 255 ), 锁定商品 Text ( 255 );
SELECT a.商品类别, a.类别名称, a.商品编号, a.商品名称, fix((a.期末数量+c.销货数量-b.进货数量)/d.换算关系) AS 期初一级数量, (a.期末数量+c.销货数量-b.进货数量)-fix((a.期末数量+c.销货数量-b.进货数量)/d.换算关系)*d.换算关系 AS 期初二级数量, a.期末金额+c.销货金额-b.进货金额 AS 期初金额, fix(b.进货数量/d.换算关系) AS 进货一级数量, b.进货数量-fix(b.进货数量/d.换算关系)*d.换算关系 AS 进货二级数量, b.进货金额, fix(c.销货数量/d.换算关系) AS 销货一级数量, c.销货数量-fix(c.销货数量/d.换算关系)*d.换算关系 AS 销货二级数量, c.销货金额, fix(a.期末数量/d.换算关系) AS 期末一级数量, a.期末数量-fix(a.期末数量/d.换算关系)*d.换算关系 AS 期末二级数量, a.期末金额
FROM ((sp_期末 AS a LEFT JOIN sp_进 AS b ON a.商品编号=b.商品编号) LEFT JOIN sp_销 AS c ON a.商品编号=c.商品编号) LEFT JOIN 商品主档 AS d ON a.商品编号=d.编号;