简体   繁体   English

无法在 MS Access 中创建带有表的子表单

[英]Unable to create subform with table in MS Access

i've tried creating a subform (also a subdata sheet).. to be able to track which employee has trained on what document type.我已经尝试创建一个子表单(也是一个子数据表).. 以便能够跟踪哪个员工已经对什么文档类型进行了培训。 I want to be able to run queries/report that i can sort either by employee name or see all employees who trained on a specific document type.我希望能够运行查询/报告,我可以按员工姓名排序或查看所有接受过特定文档类型培训的员工。

If i have 2 tables, 1 with employee names (only 27 records), and 1 with document types (about 160 records).. how do i create a relationship since the autoID numbers (or primary keys) are not the same amount?如果我有 2 个表,1 个带有员工姓名(只有 27 条记录),1 个带有文档类型(大约 160 条记录).. 由于 autoID 编号(或主键)的数量不同,我该如何创建关系?

I want to be able to have a form, that displays a datasheet where i can enter employee names and training completion dates.我希望能够有一个表格,显示一个数据表,我可以在其中输入员工姓名和培训完成日期。 There could be multiple employees who trained on the same document.可能有多名员工针对同一文档进行了培训。 So far, i've only been able to link 1 employee per 1 document.到目前为止,我只能为每 1 个文档链接 1 个员工。

Any feedback is very much appreciated!!非常感谢任何反馈! Thank you!谢谢!

This is a many-to-many relationship and requires a third "junction" table: EmpTrng.这是一个多对多关系,需要第三个“联结”表:EmpTrng。

Data entry options:数据输入选项:

  1. one form bound to EmpTrng with comboboxes to select employee and training一种绑定到 EmpTrng 的表单,带有组合框到 select 员工和培训

  2. form/subform arrangement - main form bound to Employees and subform bound to junction table with a combobox to select document表单/子表单排列 - 绑定到员工的主表单和绑定到联结表的子表单,combobox 到 select 文档

  3. form/subform arrangement - main form bound to Documents and subform bound to junction table with a combobox to select employee表单/子表单排列 - 绑定到文档的主表单和绑定到联结表的子表单,combobox 到 select 员工

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM