为什么我的Sum / Nz功能不起作用? [英] Why isn't my Sum/Nz function working?

查看:91
本文介绍了为什么我的Sum / Nz功能不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一份报告,我正在努力建立我的客户的收据。重要的字段名称是ItemPrice,SalesTax和TotalPrice。我有三个文本框,其中包含每个字段的总金额。我正在使用以下作为控制源

I have a report that I''m trying to build as a receipt for my customers. The important field names are ItemPrice, SalesTax, and TotalPrice. I have three textboxes that will contain the total amount for each of these fields. I''m using the following as the Control Source

展开 | 选择 | Wrap | 行号

推荐答案

你应该问的问题你自己是:

每个记录都有[ItemPrice]的值吗?


如果没有,那么 Sum()可能会崩溃。一旦它崩溃,试图将结果(永远不会产生)传递到 Nz()是行不通的。尝试:
The question you should be asking yourself is :
Does every record have a value for [ItemPrice]?

If not, then Sum() will probably crash. Once it''s crashed, trying to pass the result (which is never produced) into Nz() is not going to work. Try :
展开 | 选择 | Wrap | 行号


ItemPrice将始终具有值,但SalesTax可能没有,因此我更改了它。然而,没有变化。为了安全起见,我将默认控件名称从字段名称改为具有txt前缀,只是因为函数试图添加控件而不是字段。这也没有用。
ItemPrice will always have a value, but SalesTax might not, so I changed it. No change however. Just to be on the safe side I changed the default control names from being the same as the field name to having the txt prefix just incase the function was trying to add up the control instead of the field. That didn''t work either.


如果它不是数据,那么控件的部分怎么样?对于与塞特合作的内容,如此少的相关信息处理起来有点困难。如果你在汇总,那么解释在哪里以及在什么情况下是有意义的; - )
If it''s not the data then how about the section the control''s in? It''s a bit hard to work with so little relevant information as to what you''re working with Seth. If you''re aggregating, it makes sense to explain where and in what context ;-)


这篇关于为什么我的Sum / Nz功能不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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