我有一个带有未绑定子窗体(岩土控制元素的集合)的窗体,该窗体带有复选框可供选择。另一个子窗体(“ qryEDCcontrols”)查询所选集合。我想使用命令按钮手动(在用户确定他们的选择之后)将该查询的结果发送到表(tbl_SelectedEDC)。
对access缺乏经验。我认为INSERT INTO SELECT是执行此操作的正确方法。这就是我尝试过的。
Private Sub Command444_Click()
DoCmd.RunSQL
INSERT INTO tbl_SelectedEDC.
SELECT qryEDCcontrols.EDCID,qryEDCcontrols.[Select],qryEDCcontrols.[Engineering,Design and Construction Controls],qryEDCcontrols.SID,qryEDCcontrols.GRAID
FROM qryEDCcontrols
WHERE (((qryEDCcontrols.EDCID)=[Forms]![qryEDCcontrols subform]! [EDCID])AND ((qryEDCcontrols.[Select])=[Forms]![qryEDCcontrols subform]![Select]) AND ((qryEDCcontrols.[Engineering,Design and Construction Controls])
=[Forms]![qryEDCcontrols subform]![Engineering,Design and Construction Controls]) AND
((qryEDCcontrols.SID)=[Forms]![qryEDCcontrols subform]![SID]) AND
((qryEDCcontrols.GRAID)=[Forms]![qryEDCcontrols subform]![GRAID]));
``
Any direction at all would be much appreciated.
JamesD