怎样在窗体的代码中调用定义好的查询
在access的查询中我定义好一个查询,名字叫sql1。
在access的查询里面直接运行是没问题的,sql如下:
insert into tbl_checklist_remind
SELECT tbl_case.case_no, tbl_case.info_no, tbl_case.info_name, tbl_case.info_sex, tbl_case.info_age, tbl_case.info_zhenduan, tbl_case.ops_type, tbl_case.info_ops_date, remind_type
FROM tbl_case, tbl_checklist
where tbl_case.case_no = tbl_checklist.case_no and date() - tbl_case.info_ops_date >25 and date() - tbl_case.info_ops_date<36
and (tbl_checklist.point_l_1m is null or tbl_checklist.point_l_1m = 0) and (tbl_checklist.point_r_1m is null or tbl_checklist.point_r_1m = 0)
但在窗体的代码中调用不成功
docmd.runsql "sql1"
报错:运行时错误 3129