1

I have a form that is linked to a table in Access. I have an additional field which displays the sum of a few fields in the table. This field on the form is not connected to the table. I have the sum displayed on the form but what I noticed is that the sum does not appear until I move away and navigate to another record and come back to the original record. I don't see the addition as soon as I enter values in the respective fields.

Can someone help with this issue?

4

1 回答 1

0

听起来您需要为After Update总和中使用的字段的控件事件添加一些代码。该代码可以调用.Refresh执行计算和更新总数的控件方法。

编辑

另一种可能性是,如果控制值和字段值具有相同的名称,则它们之间可能存在歧义。在报表的设计视图中,如果您将字段从“字段列表”拖放到报表中,则 Access 会创建一个与该字段同名的报表控件。这可能会在以后混淆问题,因为如果有任何表达式引用,=[SomeColumn]则不清楚它是指字段还是控件。txtSomeColumn如果报告行为异常,通常简单地将控件重命名为类似的名称会有所帮助。

于 2013-04-24T06:33:08.030 回答