子窗体不显示在窗体视图中

Subform does not display in Form view

我有一个子表单,它派生自包含计算字段的查询。它不显示在窗体视图中。我已经设置了主字段和子字段链接,并且我的 'Allow Additions' 属性 设置为是。我发现的原因之一是 'The form is based on a table that has no records.' 就是这样。当然是一对多的关系,子形式就是多边table.

这里是查询:

SELECT [Management Accounting table].Date_To_Budgets,
       [Management Accounting table].Date_Returned_To_SCM, 
       [Management Accounting table].Date_To_Assets, 
       [Management Accounting table].Date_Returned_From_Assets, 
       [Management Accounting table].Select_Fund, 
       [Management Accounting table].Project, 
       [Management Accounting table].Select_SubProgramme, 
       [Management Accounting table].Cost_Centre, 
       [Management Accounting table].Item, 
       [Management Accounting table].Supplier, 
       [Management Accounting table].Amount, 
       Sum([Management Accounting table].Amount) AS [Total Amount], 
       SLD_Number
       FROM [Management Accounting table]
       GROUP BY [Management Accounting table].Date_To_Budgets, 
                [Management Accounting table].Date_Returned_To_SCM, 
                [Management Accounting table].Date_To_Assets,
                [Management Accounting table].Date_Returned_From_Assets, 
                [Management Accounting table].Select_Fund,
                [Management Accounting table].Project,
                [Management Accounting table].Select_SubProgramme, 
                [Management Accounting table].Cost_Centre, 
                [Management Accounting table].Item, 
                [Management Accounting table].Supplier, 
                [Management Accounting table].Amount,
                SLD_Number;

带有 GROUP BY 的查询根据定义是只读的。参见例如here.

因此,将 'Allow Additions' 属性 设置为 yes 并不重要 - 您将无法根据此查询将数据输入到子表单中。

=> 如果查询显示没有记录,您的子表单将完全为空。