MS-Access,表单将信息添加到一对多关系中 [英] MS-Access, form that adds info to a one to many relationship

查看:170
本文介绍了MS-Access,表单将信息添加到一对多关系中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带订单的存取表和一个带有itemId的子表。
它有一对多的关系。

我想创建一个表单,将itemId添加到选定的订单(已经存在)中。



这是我期望的样子:

 订单:[] 
ItemId:[]
Measurement1:[]
Measurement2:[]

[保存按钮]

任何人都可以帮我解决这个问题吗?

解决方案

子表单在政治上是正确的如果您希望用户有权访问订单屏幕,请继续。如果用户不需要直接访问订单详细信息,只需要访问项目,那么您可以为组合框添加

 订单:[[V]] 

有控制源作为订单中订单ID的查询表。将它链接到Item表中的Orders字段,它将存储订单作为子表单,而不让用户看到订单的详细信息。



但是,如果您希望为选定的订单显示多个项目,使用子窗体(具有多个项目的子窗体)

I have a access table with Orders and a sub-table with itemId's. It has one to many relationship.

I want to create a form that adds itemId's to a selected order(already existing).

This is how i expect it to look like:

Order:        [            ]
ItemId:       [            ]
Measurement1: [            ]
Measurement2: [            ]

        [Save-button]

Can anyone help me with this?

解决方案

Subforms are the politically correct way to go IF you want users to have access to the order screen. If users do not need access to the order details directly, only to items, then you could put a combo-box for

 Order: [              [V]]

which has its control source as a query for your order ID in the orders table. Link that to your Orders field in the Item table and it will store the order as a subform would, without letting the user see details of the order.

However, if you want multiple items shown for a selected order, use subforms (having a subform which is multiple-item)

这篇关于MS-Access,表单将信息添加到一对多关系中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆