访问中的VBA问题 [英] VBA problem in access
问题描述
我开始使用访问权限,并且我已经达到了访问权限2003的最大知识。
问题是我需要一个自定义VBA来为我的访问应用程序构建自定义函数。 br />
我需要进行计算,我有一个查询,其中包含零件数量和库存金额。
现在我将这些金额按最高值排序到最低值。
我在下一个领域需要的是:
在表格的第一行;表格第二行中第一个最高值
的总和;表格第三行中前两个最高值
的总和;
现在我在想,也许我可以在金额旁边放一个id,这是前3个最高值的总和
等等。比在sumll中做sumif这样的事情。
但必须有一个更简单的方法。
我希望你能帮助我。
I am starting to use access and i have reached the maximum of my knowledge of access 2003.
The problem is that i need a custom VBA to build a custom function for my access application.
I need to do a calculation, i have a query which contains partnumbers and amounts on stock.
Now i have these amounts sort by highest value to lowest value.
What i need in the next field is:
in the first row of the the table; the sum of the first highest value
in the second row of the table ; the sum of the first 2 highest values
in the third row of the table ; the sum of the first 3 highest values
and so on and so on
Now i was thinking, maybe i can put an id next to the amounts and than do something like sumif in excell.
But there must be an easier way.
I hope you can help me.
推荐答案
[PartNumber] Fieled是否在逻辑中扮演任何角色,或者它只是金额的连续总计?
Does the [PartNumber] Fieled play any Role in the Logic, or is it just the Consecutive Totalling of the Amounts?
@ADezii
嗯,partnumber与金额有关。必须是保持联系。也许我可以用小计来做点什么我猜。
@ADezii
Well, the partnumber is linked to the amounts.And has to be kept linked. Maybe i can do something with subtotals i guess.
@ALESI:
您还需要发布一些数据作为期望的结果,以便我们可以完全理解您的要求。
@ALESI:
You are going to have to Post some Data as well as the Desired results, so that we can fully comprehend what you are requesting.
这篇关于访问中的VBA问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!