在相关表中设置默认值 [英] setting a default value in a related table

查看:78
本文介绍了在相关表中设置默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本订单和客户支持跟踪数据库。我需要说明客户偶尔会在彼此之间转移支持许可证这一事实。因此每个产品都有一个关联的订单,每个订单都有一个关联的客户。
每个产品还有一个关联客户,通常(但不总是)与订单关联的客户相同。在创建订单时,我需要将每个产品的客户设置为等于订单的客户。因此,默认情况下,
每个产品都链接到购买它的客户(有意义)。然后,如果有必要,可以随后更改此默认值。

I've got a basic orders and customer support tracking database. I need to account for that fact that customers will occasionaly transfer support licenses between each other. so each product has an associated order, and each order has an associated customer. Each product also has an associated customer, which is usually (but not always) the same as the customer associated with the order. At the time the order is created, i need to set the customer of each product equal to the customer of the order. Thus by default each product is linked to the customer who bought it (makes sense). It would then be possible subsequently to change this default value if necessary.

我无法确定如何正确引用子表中的值。#

I'm having trouble figuring out how to correctly reference the value in the child table.#

我有一个"新订单"表单,其具有"OrderItems"和"OrderItems"。子窗体。我在订单表格中将客户设置在一个组合框中,并希望在子表单更改时更新客户

I have a "New Order" form, which has an "OrderItems" subform. I'm setting the customer in a combobox in the order form, and would like to update the customer in the subform whenever it is changed

推荐答案

不确定我理解您的设置,但如果您使用表单/子表单配置,则不必担心设置任何默认值。 Access会自动将子记录与其父记录关联。

Not sure I understand your setup but if you use a form/subform configuration, you won't have to worry about setting any Default Value. Access will automatically associate the child record to its parent.

希望它有帮助...


这篇关于在相关表中设置默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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