根据总和更新字段... [英] Updating a field based on a sum...

查看:77
本文介绍了根据总和更新字段...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我知道将一笔金额附加到桌子上并不是标准做法,但是根据我正在处理的数据,我无法解决这个问题。


我正在创建一个发票数据库,将数据输出到Sage Line 50.


我有2个表,我将其输出到Sage中:帐户详细信息和主发票详细信息(包含发票编号,发票日期,金额等)


我还有两个表,一个是发票明细(1-1关系)和第二个发票明细它给出了一种类型(材料,劳动力)和数量。我添加了一个总和在子表单的底部。


我想要做的是验证,其中细分必须=最初在第一个表中输入的数量。或者发票明细的总和会自动更新上一个表单中的字段。


有人可以帮忙吗?

Hi everyone,

I know its not standard practice to attach a sum to a table, but with the data I am working with I cant really work around it.

I am creating an invoicing database that will export data into Sage Line 50.

I have the 2 table which I export into Sage being: Account Details, and Main Invoice Details (which contains invoice number, inv date, amount etc)

I then have two further tables one being invoice details (1-1 relationship) and the second Invoice Breakdown which gives a type (materials, labour) and an amount. I have added a "sum" at the bottom of the subform.

What I would like to do is either have a validation where the breakdown must = the amount originally entered in the first table. Or where the sum of the invoice breakdown automatically updates the field in the previous form.

Can anybody help?

推荐答案

为什么总和不仅仅是子表单中的计算(未绑定)字段?为什么它必须存储在表中?
Why can the sum not simply be a calculated (unbound) field in your subform? Why does it have to be stored in the table?



为什么总和不能简单地是子表单中的计算(未绑定)字段?为什么必须存储在表中?
Why can the sum not simply be a calculated (unbound) field in your subform? Why does it have to be stored in the table?



您好


不幸的是,因为我创建此数据库以将发票明细导入我的帐户软件中,我需要 ;总和"保存,以便正确导入信息。


这可能吗?


Dan

Hi there

Unfortunately, because I am creating this database to import invoice details into my accounts software I need the "sum" to be saved in order that the information is imported correctly.

Is this possible at all?

Dan

我认为您的意思是需要将数据传输到期望以特定格式使用的帐户包中。

数据是否首先在标准布局中导出?或者帐户软件是否链接到表中并获取数据?


可以在表中写入一个总和,但是它是如此强烈建议的原因(同样如用于在数据库中的多个位置存储任何信息)是保持准确的链接(使得总数始终正确)是一个噩梦,最好通过以推荐的方式做事来避免。

我们会在你回答完两个问题后看到需要做些什么。
I presume you mean that the data needs to be transferred into the accounts package which is expecting it in a particular format.
Is the data exported first in a standard layout? Or does the accounts software link into the table and grab the data?

It is possible to write a sum into a table, but the reason it is so heavily advised against (the same as for storing any information in more than one place in a database) is that maintaining accurate links (such that the totals are always correct) is a nightmare that it is better to avoid by doing things the recommended way.

We''ll see what needs to be done after you''ve answered my two questions.


这篇关于根据总和更新字段...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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