如何在查询旁边的表单中添加复选框以附加到另一个表
我正在构建一个培训数据库。我使用的表是:员工、培训课程、培训中和已完成的培训。我有一个查询,可以过滤掉表单以显示尚未接受培训的员工。
我想在结果旁边添加一个复选框,以便我可以选择将其中的部分或全部添加到“训练中”表中。几天来我一直在这个问题上搜索互联网和阅读书籍来寻找答案。
I am building a training database.The tables I am using are: Employees, Training Courses, In Training, and Completed Training. I have a query that filters off of a form to show employees that have not received the training.
I want to add a checkbox next to the results so I can select some or all of them to be added to the In Training table. I have been stuck on this for days searching the internet and reading books looking for the answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚看到这个问题。这是此问题的替代解决方案。没有复选框,但您会得到一个带有组合框的子表单,用于更新特定员工的课程和进度。
创建 4 个表,其中包含以下字段:
在 tblEmployees 和 tblEmployeeTraining 之间创建一对多关系,链接 EmployeeID。
通过从“数据类型”列中选择“查找向导...”,在 tblEmployeeTraining(在设计视图中)中配置以下字段。
根据 tblEmployees 创建一个表单。您应该获得一个包含的子表单,其中将显示课程名称和进度。基本上,子表单中的两列将显示组合框,供您选择课程和进度。
如果您不想要步骤2中的关系,也许您想在删除员工数据后存储员工数据,那么您需要创建一个查询并将其用作子表单的RecordSource。您可能希望在 tblEmployees 中添加一个字段来确定员工是否处于活动状态,而不是从 tblEmployees 中删除记录。然后,您可以使用上述步骤,只需在表单上进行过滤即可显示那些活跃员工。
Just saw this question. Here is an alternative solution to this problem. There is no checkbox, but you get a subform with combo box to update the course and progress for a particular employee.
Create 4 tables with the fields:
Create a one-to-many relationship between tblEmployees and tblEmployeeTraining, linking the EmployeeID.
Configure the following fields in tblEmployeeTraining (in Design View), by selecting the [Lookup Wizard...] from Data Type column.
Create a Form based on the tblEmployees. You should get a subform included that will display the Course Name and Progress. Basically, the 2 columns in the subform will show combo box for you to select the course and the progress.
If you do not want the relationship in step 2, maybe you want to store the employee data after it is deleted, then you need to create a query and use it as the RecordSource for the subform. Instead of deleting the record from tblEmployees, you may want to add a field in tblEmployees to determine if the employee is active or not. Then, you can use the above steps and just do filtering on the form to display those active employees.