Access 2013主窗体无法与子窗体连接

时间:2016-01-26 10:11:40

标签: mysql vba ms-access

我构建了一个查询,从表单及其2个子表单中拯救信息。当我运行查询时,似乎查询无法识别主字段和子字段。因为它是空的,在提交表单后没有结果。 我已经在子表单中定义了主字段和子字段。所以我想知道我是否在查询中定义了一些错误。我的关键字段是ProjectID。

这是我的查询的SQL:

SELECT tblGI.ProjectID, tblMS.methodstate, tblMS.methodstatepic,         tblMS.eqrecomend, tblMS.scheduleest, tblKF.WorkDepth, tblKF.MaterialSoilInfo, tblKF.MaterialSoilType, tblKF.MaterialShredStrenght, tblKF.MaterialDensity, tblKF.MaterialRockSize, tblKF.SorroundingSoilInfo, tblKF.SorroundingSoilType, tblKF.SorroundingShredStrenght, tblKF.SorroundingDensity, tblKF.SorroundingRockSize, tblKF.Landscape, tblKF.[Level of Current], tblKF.BackfillingIssues, tblKF.Visibility
FROM (tblGI INNER JOIN tblKF ON tblGI.ProjectID = tblKF.ProjectID) INNER JOIN tblMS ON tblGI.ProjectID = tblMS.ProjectID
WHERE (((tblGI.ProjectID)=[Forms]![frmGI]![ProjectID]) AND ((tblGI.Service1)=[Forms]![frmGI]![CboService]));

这是我的子表单一个声明: tblKF子表单

SELECT tblKF.WorkDepth, tblKF.MaterialSoilInfo, tblKF.MaterialSoilType,   tblKF.MaterialShredStrenght, tblKF.MaterialDensity, tblKF.MaterialRockSize, tblKF.SorroundingSoilInfo, tblKF.SorroundingSoilType, tblKF.SorroundingShredStrenght, tblKF.SorroundingDensity, tblKF.SorroundingRockSize, tblKF.Landscape, tblKF.[Level of Current], tblKF.Visibility, tblKF.BackfillingIssues, tblKF.ProjectID
FROM tblGI INNER JOIN tblKF ON tblGI.ProjectID = tblKF.ProjectID;

这是我的子表2声明: tblMS子表单

SELECT tblMS.*
FROM tblGI INNER JOIN tblMS ON tblGI.ProjectID = tblMS.ProjectID;

我多次查看代码,任何想法或消息?

0 个答案:

没有答案