Access Project(adp) - 过滤表单和子总计 [英] Access Project (adp) - Filter form and sub totals

查看:97
本文介绍了Access Project(adp) - 过滤表单和子总计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在使用连接到MS SQL Server 2000数据库的Microsft Access 2000 Project(adp文件)。


我创建了一个连续的表单,其中包含详细信息部分(查询结果)和页脚部分(聚合函数)。


我的问题涉及在页脚部分计算的小计在表格中过滤结果时不会更新。


例如,如果我们有以下结果


ID城市国家人口

1巴黎法国2.100.000

2纽约美国8.100.000

3马赛法国800.000


计算的小计总数是11.000.000这是正确的。


但是,当我将表格中的结果过滤到国家"法国" (通过选择右过滤),计算的小计仍然是11.000.000 <,这是错误的。 :confused:


任何人有同样的问题吗?


任何有想法的人?


我已经使用Access数据库(.mdb文件)测试了此功能,并在过滤结果时正确更新了子总数。 :eek:


为什么adp之间存在不同的行为?和mdb文件?


任何人都有想法获得带有过滤结果的正确小计?


感谢您的帮助。


Terrybens

解决方案

你是如何计算结果的?


comteck

= Sum([Database_field])


Terrybens


我想在过滤器事件上添加VBA来重新计算总计但这似乎很难。应该有另一个解决方案,因为mdb文件没有问题。


我所有的查询都在proc库存中,所以我不能使用mdb文件。


Terrybens。


Hello,

I''m using a Microsft Access 2000 Project (adp file) connected to MS SQL Server 2000 database.

I have created a continous form having a detail part (results of the query) and a footer part (aggregate functions).

My problem concerns the sub-totals calculated in the footer part that are not updated when the results are filtered in the form.

For exemple, if we have the following results

ID City Country Population
1 Paris France 2.100.000
2 New-York USA 8.100.000
3 Marseille France 800.000

The sub-total calculated is 11.000.000 which is correct.

However, when I filter the results in the form to the country "France" (right filter by selection), the sub-total calculated is still 11.000.000 which is wrong. :confused:

Anyone have the same problem ?

Anyone having an idea ?

I have tested this functionnality with a Access database (.mdb file) and the sub-total is correctly updated when the results are filtered. :eek:

Why a different behavior between an "adp" and a "mdb" file ?

Anyone having an idea to get the correct sub-totals with filtered results ?

Thank you for your help.

Terrybens

解决方案

How are you calculating the result?

comteck


=Sum([Database_field])

Terrybens


I thought about adding VBA on the filter event to recalculate the totals but this seems to be quite difficult. There should be another solution because there is no problem with an mdb file.

All my queries are in proc stocks so I cannot use an mdb file.

Terrybens.


这篇关于Access Project(adp) - 过滤表单和子总计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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