计算字段和总计 [英] calculating fields and totals

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

问题描述

我在保险办公室工作并创建了一个客户数据库。 我使用查找表创建了field1 [Coverage]。 接下来,如果IIF语句依赖于选择的field1值,我创建了field2 [Rates]和一系列。 然而,当我尝试在field3 [Total Premium]中包含field2 [Rates]的结果时,它的工作正常,
它将不包括计算字段。 我做错了什么? 谢谢。


解决方案

而不是通过名称引用第二个控件,重复表达式中的表达式,返回第三个控件的值。



但是,你在第二个控件的表达式中调用IIF函数的事实确实表明数据在表达式中被硬编码 数据库关系模型的基本原则是信息原则(Codd的规则
#1)。这要求所有数据都存储为表格中行中列位置的值,而不是其他方式。


Coverages,Rates和TotalPremiums之间的关系应该是什么它们是表之间的关系,每个表代表三种实体类型中的一种。 然后,在查询上创建一个表单变得很简单,它返回两个引用表中的费率
和总保费。

I work in an insurance office and created a database of our clients.  I created field1 [Coverage] with a Lookup table.  Next I created field2 [Rates] with a series if IIF statements dependent on field1 value selected.  That worked fine however, when I attempt to include the results of field2 [Rates] in field3 [Total Premium] it will not include the calculated field.  What am I doing wrong?  Thank you.

解决方案

Rather than referencing the second control by name, repeat the expression within the expression which returns the value for the third control.

However, the fact that you are calling the IIF function in the second control's expression does suggest that data is being hard-coded in the expression.  A fundamental principle of the database relational model is the Information Principle (Codd's Rule #1). This requires that all data be stored as values at column positions in rows in tables, and in no other way.

The relationships between Coverages, Rates and TotalPremiums should be what they are, relationships between tables, each of which represents one of the three entity types.  It then becomes a simple matter of basing a form on a query which returns the rates and total premiums from the two referenced tables.


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

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