如何获得特定产品的总数 [英] How to get a total of a particular product

查看:107
本文介绍了如何获得特定产品的总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为Engines Manufacturer的文本框。这个texbox为我提供了产品上的引擎类型。我还有一个名为Annual Qty Est的文本框。此文本框提供该特定产品上的引擎数。我有2个问题。


1.我想知道放入文本框控件源的代码,只能查看特定引擎制造商的年度数量。示例:在报告的引擎制造商列中,我有一个名为BS的引擎。我只想知道BS的年度数量。发动机。


2.为了进一步继续这个,我还想要只有BS的百分比。引擎。示例:假设在报告中,所有年度数量的总和为100,000。其中,BS是指BS。 100,000个引擎中有10,000个引擎。我知道这是10%,但我不知道要放入该文本框的控制源的代码。


请问我能帮忙解决一下这个问题。

解决方案

你最有可能找的是:

展开 | 选择 | Wrap | 行号



您最有可能寻找:

展开 | 选择 | Wrap | 行号



我尝试了这个代码:DSum([Year Qty Est],Area_1_Products,[Engine Manufacturer] =" Kohler &安培;我。[引擎制造商])


我得到的是一个错误说明:查询表达式中的语法错误(缺少运算符)First([DSum(" [Annual Qty Est] ]"," Area_1_Products"," [Engine Manufacturer] =" Kohler"& Me]。[[Engine Manufacturer])])''。


那么什么我做错了吗?你能帮忙吗?

Area_1_Products是此报告尝试生成的查询。

和引擎制造商是正确的而不是引擎制造商。



如果你知道引擎制造商将永远是科勒,那么它应该是:

展开 | 选择 | Wrap | 行号

I have a textbox called Engines Manufacturer. This texbox gives me the type of engine that is on the product. I also have a textbox called Annual Qty Est. This textbox give the number of engines that is on that particular product. I have 2 questions.

1. I want to know the code to put in my textbox control source to see only the Annual Qty Est for a particular Engines Manufacturer. Example: In the Engines Manufacturer column in the report I have an engine called "BS". I want to know only the Annual Qty Est for "BS" engines.

2. To further go on this, I also want to the the percentage for only "BS" engines. Example: Lets say that on the report the sum of all Annual Qty Est is 100,000. Out of that, "BS" engines is 10,000 out of that 100,000. I know this is 10%, but I don''t know the code to put into my control source for that textbox.

Can I please get some help on this matter.

解决方案

You''re most likely looking for:

Expand|Select|Wrap|Line Numbers


You''re most likely looking for:

Expand|Select|Wrap|Line Numbers


I tried this code: DSum("[Annual Qty Est]", "Area_1_Products", "[Engine Manufacturer] = "Kohler" & Me.[Engine Manufacturer])

And all I get is a error stating: Syntax error (missing operator) in query expression "First ([DSum("[Annual Qty Est]", "Area_1_Products", "[Engine Manufacturer] = "Kohler" & Me].[[Engine Manufacturer])])''.

So what am I doing wrong? Can you please help?
The Area_1_Products is the query in which this report is trying to generate.
And Engine Manufacturer is correct instead of Engines Manufacturer.

If you know Engine Manufacturer will always be Kohler, then it should be:

Expand|Select|Wrap|Line Numbers


这篇关于如何获得特定产品的总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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