我需要帮助处理表单中的运行总计。访问2010? [英] I need help with a running total in a form. Access 2010?

查看:46
本文介绍了我需要帮助处理表单中的运行总计。访问2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张名为Dies的表格。模具在生产过程中使用,在使用后我想更新它的革命。除此之外,我在这张表中有一个名为Total Revolutions and Repeat的字段。我创建了一个表查询,它允许我计算作业转数。在查询中,我有一个:终身开始,终身结束和工作革命(这些都不在表中)。通过从结尾减去寿命开始并将其除以重复来计算作业转数。所以看起来像这样:[终身结束] - [终身开始] / [重复]。这完美无缺,但如何在总转数中得到总和?


因此,如果我的工作革命在第一次运行时计算到2000,那么下一次计算为3000,我的总革命总数将达到5000,依此类推。我的主键叫做MOD编号(一个唯一的序列号)。我想我需要使用DSUM,但我不确定如何。


当我搜索特定的MOD编号时,它会显示总转数。

I have a table called "Dies". A die is used in a production process, and after its used I want to update it''s "Revolutions". Amongst others, I have a field called Total Revolutions and Repeat in this table. I have created a table query which allows me to calculate the job revolutions. On the query, I have a: Lifetime Start, Lifetime End and job revolutions(None of these are in the table). The job revolutions are calculated by subtracting the lifetime start from the end and dividing it by the Repeat. So it looks like this: [Lifetime End] - [Lifetime Start] / [Repeat]. This works perfectly, but how do I get this total to sum in the Total Revolutions?

So if my Job revolutions calculates to 2000 on the first run, then 3000 the next time, my Total Revolutions will sum to 5000, and so forth. My primary key is called MOD Number (a unique serial number). I think I need to use DSUM, but I''m not sure how.

When I perform a search for a particular MOD Number, it will show me the total revolutions.

推荐答案

MS Access''reports''具有运行总和的内置功能。这应该符合你的目的。
MS Access ''reports'' are having built in feature of running sum. That should serve your purpose.


嗨!

首先,你用来计算革命的公式是真的吗?

我认为一定是:
[终身结束] - [终身开始] / [重复]

但是这个只是我的意见。


让我了解你的查询是如何工作的?!

当你运行查询时,系统会提示你输入 Lifetime Start 终身结束以计算工作革命

如何知道Die执行此计算的内容?!?!?


据我所知(但我不确定我是否理解你的要求以及你的背景)你需要在你的 Dies中再定义两个字段表。一个用于存储终身开始,另一个用于存储终身结束

此方法可帮助您随时计算任何您想要的内容。 br />

我假设您在 Dies 表中存储了您在加工过程中使用的每个模具。

如果,在模具表存储类型的模具你需要另一种方法。



澄清,请问你的问题。
Hi !
First of all, is the formula you use to calculate revolution the real one ?
I think it must be:
( [Lifetime End] - [Lifetime Start] ) / [Repeat]
But this is only my opinion.

Let me understand how your query work ?!
When you run the query you are prompted to input Lifetime Start and Lifetime End in order to calculate the Job Revolutions ?
How Access know for what Die perform this computation ?!?!?

As far as I can see (but I am not sure I understand well your request as well as your background) you need to define two more fields in your Dies table. One to store the Lifetime Start and another one to store the Lifetime End.
This approach will help you to calculate anything you wish anytime.

I assume that you store, in Dies table, every die you use in machining process.
If, in the Die table you store the type of dies you need another approach.


Clarify, please, your problem.


嗨Mihail,谢谢你的回复。首先,我需要更新的唯一字段是Total Revolutions,在我的表格中。我已经设置了一个搜索查询,以便用户可以输入骰子的序列号,当他们点击搜索时,它会显示该骰子的信息,其中包括Total Revolutions。字段,终身开始,终身结束和工作革命也出现在表格上,但只是为了让我能够计算那份工作的轮回,这将会(手指交叉)更新模具表中的总革命,但是这些领域本身不会不需要存储。举例来说,用户打开搜索表单并键入序列号并点击搜索。将打开一个表单,显示模具信息。让我们说它显示总革命10,000。此时,Lifetime Start,Lifetime End和Job Revolutions为零,因为它们未存储。我坚持在Lifetime开始时为25,000(我将这个数字从机器上的机器上取下),Lifetime结束为50,000。当我点击返回或标签时,作业革命显示25,000,然后将这25,000加到总革命中,现在应该显示35,000。我点击保存并退出。下次我搜索相同的模具时,它将显示总转数为35,000,等等。
Hi Mihail, thanks for the reply. Firstly, the only field I need to update is Total Revolutions which is in my table. I have set up a search query so that the user can input the serial number of the die and when they hit search it brings up the info for that die which includes the Total Revolutions. The fields, Lifetime Start, Lifetime End and Job Revolutions come up on the form too, but only to enable me to calculate the revolulutions for that job which will (finger crossed) update the Total Revolutions in the die table, but the fields themselves don''t need to be stored. So as an example, the user opens the search form and types in the serial number and hits search. A form opens displaying the die info. Lets say it shows Total Revolutions 10,000. At this point Lifetime Start, Lifetime End and Job Revolutions are at zero as they are not stored. I stick in the Lifetime start as 25,000(i get this number off the machine the die was in) and Lifetime end as 50,000. When I hit return or tab, the Job Revolutions displays 25,000, then adds this 25,000 to the Total Revolutions which should now show 35,000. I hit save and exit. Next time I search for that same die it will show the Total Revolutions as 35,000 and so forth.


这篇关于我需要帮助处理表单中的运行总计。访问2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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