上述设计需要四个子窗体。每个子表单都应基于以书 id 作为链接子字段和主字段的联结表,以及基于第二个表 id 的相关表的组合框。
例如,您的第一个子表单是 Authors,它所基于的表是 Libri_Autori
Link Master Field: Id
Link Child Field: SchedaLibro
组合框:
Control Source: SchedaAutore
Row Source : SELECT Id, Nome FROM Autori
Bound Column: 1
Column Count : 2
Column Widths : 0, 2
创建您的图书表单,然后开始添加子表单,向导将为您完成大部分工作。
要将记录添加到 authors 表中,您需要将 Limit To List 设置为 Yes 并在 Not In List 事件上运行代码。我喜欢使用一个小的弹出表单将项目添加到“背景”表中。使用 Access 2010 可能会更容易,因为您可以设置ListItemsEditForm
1、书本窗体,就在添加子窗体之前。请注意,选择了使用控制向导。这是默认设置,所以除非您取消选择它,否则应该没问题。

添加子表单的各种向导步骤

选择子表单域

选择链接子字段和主字段

显示以黄色突出显示的子窗体控件和控件属性的窗体

2、添加组合
您可以通过右键单击并自己设置属性来将子表单向导添加的字段更改为组合...

...或者您可以删除现有控件并使用向导添加组合。第一步是选择组合的类型。

第二步是选择表或查询

第三步是选择字段

第四步选择排序顺序这里不显示,这是第五步,就是设置列宽

第六步是设置控制源

您最终将得到一个包含所示属性的组合框

最终形式
