子表单问题中的计算列 [英] Calculated Column in Subform Problem

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

问题描述

由于我必须离开,所以要快速发布,所以我希望我能在消息中获得所有相关信息。


我有一个子表单,结果基于在选择查询上。结果就像这样(只是结果的一小部分)


计算的季度价值

4 200 25

3 175 - 5

2 180 30

1 150 0


假设前两列来自我的选择查询。

第3列是我需要弄清楚的。这是一个公式,只是假设我需要从第1行的Qtr3中减去Qtr4的值,从第2行的Qtr2中减去Qtr3,等等。


我画了一个空白怎么样我可以在子表单上完成此操作。任何方向都会受到赞赏。


欢呼,

Going to post this real fast since I have to go out, so I hope I get all the pertenent info in the message.

I have a subform and the results are based on a select query. Results are say like so (just a snippet of the results)

Quarter Value Calculated
4 200 25
3 175 -5
2 180 30
1 150 0

Assume the first 2 columns are derived from my select query.
The 3rd column is the one I need to figure out. It is a formula and just assume I need to subtract the value of Qtr4 from Qtr3 for row 1, subtract Qtr3 from Qtr2 for row 2, etc.

I am drawing a blank how I can accomplish this on the subform. Any direction would be appreciated.

cheers,

推荐答案

您可以在包含记录源的查询中创建计算字段为子表格。此计算字段将调用公共函数并将每个记录的[Quarter]和[Value]字段中的值传递给它。逻辑将包含在函数中,它将返回表示Quarters之间差异的整数值。我有类似的想法:
You can create a Calculated Field within the Query comprising the Record Source for the Sub-Form. This Calculated Field would call a Public Function and pass to it the Values in the [Quarter] and [Value] Fields for each Record. Logic would be contained within the Function and it would return an Integer Value representing the difference between the Quarters. I had something like this in mind:
  1. 查询中的计算字段
  1. Calculated Field in Query
展开 | 选择 | 换行 | 行号


是多年。我会在周末看看这个。


感谢Ade。


干杯,

Yes multiple years. I will look at this over the weekend.

Thanks Ade.

cheers,


您可以在包含子表单记录源的查询中创建计算字段。此计算字段将调用公共函数并将每个记录的[Quarter]和[Value]字段中的值传递给它。逻辑将包含在函数中,它将返回表示Quarters之间差异的整数值。我有类似的想法:
You can create a Calculated Field within the Query comprising the Record Source for the Sub-Form. This Calculated Field would call a Public Function and pass to it the Values in the [Quarter] and [Value] Fields for each Record. Logic would be contained within the Function and it would return an Integer Value representing the difference between the Quarters. I had something like this in mind:
  1. 查询中的计算字段
  1. Calculated Field in Query
展开 | 选择 | 换行 | 行号



是多年。我会在周末看看这个。


感谢Ade。


欢呼,
Yes multiple years. I will look at this over the weekend.

Thanks Ade.

cheers,

  1. tblMshmyob
  1. tblMshmyob
展开 | 选择 | Wrap | 行号


这篇关于子表单问题中的计算列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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