在子表单中包含TOTALS [英] Include TOTALS in a subform

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

问题描述

我有一个显示大约10个字段的子表单。显示的大多数值

来自一些复杂的计算。为了方便起见,我将

结果存储在临时表中,然后我需要做的就是将子表单的

记录源设置为等于表。 br />

但是,如果子表单中的最后一行显示前一行的

总计(当然适用的话),那将是非常好的。如果它是一个

列表框(不需要滚动),我通常会在列表框下面包含文本框

,其中包含总计。但是,我使用子窗体的原因是因为水平滚动是必要的,用户可能会想要在滚动时修改左侧列。$ / b。


那么在子表单中包含总计的最佳方法是什么。它们必须是底部显示的
。我可以用一行具有

总值的行填充表格。其中一个字段可以设置为''TOTAL''。

所以,我可能需要做的就是对结果进行排序,使得''TOTAL''是最后一个

在订购结果中排。


感谢您的帮助。


-

通过AccessMonster.com发布的消息
http://www.accessmonster.com/Uwe/For...ccess/200610/1

解决方案

2006年10月13日星期五,格林尼治标准时间13:44:12,rdemyan来自AccessMonster.com

< u6836 @ uwewrote:


将文本框放在子窗体的页脚中,并将

ControlSource设置为:

= Sum([Price])


-Tom。


>我有一个显示大约10个字段的子表单。显示的大多数值来自某些复杂的计算。为了方便起见,我将
结果存储在临时表中,然后我需要做的就是将子表单的
记录源设置为等于表格。

然而如果子表单中的最后一行显示前一行的
总数(当然适用的话),那将是非常好的。如果它是一个
列表框(不需要滚动),我通常会在列表框下面包含文本框,其中包含总计。但是,我使用子窗体的原因是因为水平滚动是必要的,并且用户可能希望在滚动时修复左侧列。

那么''是在子表单中包含总计的最佳方法。它们必须显示在底部。我可以用一行具有
总值的行填充表格。其中一个字段可以设置为''TOTAL''。
所以,我可能需要做的就是对结果进行排序,使''TOTAL''成为最后一行。有序的结果。

感谢您的帮助。




" rdemyan via AccessMonster.com" < u6836 @ uweschreef in bericht news:67b47de96b111 @ uwe ...


那么在子表单中包含总计的最佳方法是什么。它们必须是底部显示的
。我可以用一行具有

总值的行填充表格。其中一个字段可以设置为''TOTAL''。

所以,我可能需要做的就是对结果进行排序,使得''TOTAL''是最后一个

排序结果中的行。



很容易在你的临时表中包含一个字段''sortorder''。

Sortorder = 0表示所有记录除了最后一个一个sortorder = 1

然后在sortorder和你的其他排序字段上排序子表单(查询)。


但如果子表单中有很多记录怎么办? ?

总计的行不可见*总是*


我会在主窗体上包含文本框,就像使用列表框一样。


Arno R


好的。得到这个工作。


如何突出显示TOTAL行,以便用户清楚它是否b / b
包含上面行的总数?


谢谢。


Arno R写道:


>


>那么什么是在子表单中包含总计的最佳方法。它们必须显示在底部。我可以用一行具有
总值的行填充表格。其中一个字段可以设置为''TOTAL''。
所以,我可能需要做的就是对结果进行排序,使''TOTAL''成为最后一行。有序的结果。


很容易在你的临时表中包含一个字段''sortorder'。
Sortorder = 0表示所有记录,除了最后一个记录,其中sortorder = 1
然后在sortorder和你的其他排序字段上对子表单(查询)进行排序。

但如果子表单中有很多记录怎么办?
总计的行不可见*总是*

我会在主窗体上包含文本框,就像使用列表框一样。

Arno R



-

通过AccessMonster.com发布的消息
http://www.accessmonster.com/Uwe/For...ccess/200610/1


I have a subform that displays around 10 fields. Most of the values shown
result from some complex calculations. To make it easy, I have stored the
results in a temporary table and then all I need to do is set the
recordsource of the subform equal to the table.

However, it would be very nice if the last row in the subform showed the
totals of the previous rows (of course where applicable). If it were a
listbox (that didn''t require scrolling) I would normally include textboxes
below the listbox, which would contain the totals. However, the reason I
used a subform is because horizontal scrolling is necessary and the user may
want to fix the left-hand columns as they scroll.

So what''s the best way to include totals in the subform. They must be
displayed at the bottom. I could fill the table with a row that has the
total values. One of the fields could be set to have a value of ''TOTAL''.
So, maybe all I need to do is order the results such that ''TOTAL'' is the last
row in the ordered results.

Thanks for any help.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200610/1

解决方案

On Fri, 13 Oct 2006 13:44:12 GMT, "rdemyan via AccessMonster.com"
<u6836@uwewrote:

Put the text boxes in the Footer of the Subform, and set the
ControlSource to something like:
=Sum([Price])

-Tom.

>I have a subform that displays around 10 fields. Most of the values shown
result from some complex calculations. To make it easy, I have stored the
results in a temporary table and then all I need to do is set the
recordsource of the subform equal to the table.

However, it would be very nice if the last row in the subform showed the
totals of the previous rows (of course where applicable). If it were a
listbox (that didn''t require scrolling) I would normally include textboxes
below the listbox, which would contain the totals. However, the reason I
used a subform is because horizontal scrolling is necessary and the user may
want to fix the left-hand columns as they scroll.

So what''s the best way to include totals in the subform. They must be
displayed at the bottom. I could fill the table with a row that has the
total values. One of the fields could be set to have a value of ''TOTAL''.
So, maybe all I need to do is order the results such that ''TOTAL'' is the last
row in the ordered results.

Thanks for any help.



"rdemyan via AccessMonster.com" <u6836@uweschreef in bericht news:67b47de96b111@uwe...

So what''s the best way to include totals in the subform. They must be
displayed at the bottom. I could fill the table with a row that has the
total values. One of the fields could be set to have a value of ''TOTAL''.
So, maybe all I need to do is order the results such that ''TOTAL'' is the last
row in the ordered results.

Would be easy enough to include a field ''sortorder'' in your temptable.
Sortorder = 0 for all records except the last one where sortorder = 1
Then sort the subform(query) on sortorder AND your other sorting fields.

But what if there are many records in the subform?
The row with the totals won''t be visible *always*

I would include textboxes on the mainform just as you would do with listboxes.

Arno R


Ok. Got that to work.

How can I highlight the TOTAL row so that it is clear to the user that it
contains the totals of the rows above?

Thanks.

Arno R wrote:

>

>So what''s the best way to include totals in the subform. They must be
displayed at the bottom. I could fill the table with a row that has the
total values. One of the fields could be set to have a value of ''TOTAL''.
So, maybe all I need to do is order the results such that ''TOTAL'' is the last
row in the ordered results.


Would be easy enough to include a field ''sortorder'' in your temptable.
Sortorder = 0 for all records except the last one where sortorder = 1
Then sort the subform(query) on sortorder AND your other sorting fields.

But what if there are many records in the subform?
The row with the totals won''t be visible *always*

I would include textboxes on the mainform just as you would do with listboxes.

Arno R

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200610/1


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

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