我一直在努力让dcount在现有数据库中工作,查询和报告名称相同并让我头疼,所以我创建了一个简单的1表db来测试它。
它有一个field1,其值为id1 id1 id2 id3
我想计算不同值的数量。 即从上面得到3。 我使用表达式在报表页脚中创建了一个包含字段的报表
=DCount("[Field1]","Table1")..it返回4
然而,当我检查微软网站上有关dcount如何工作的描述时,它明显地说它计算了不同的条目。 有人可以澄清吗?
I've been trying to get dcount to work in an existing database with queries and report names that are the same and was giving myself a headache, so I created a simple 1 table db to test it out.
It has a field1 with these values id1 id1 id2 id3
I want to count the number of distinct values. i.e. get 3 from the above. I created a report with a field in the report footer with the expression
=DCount("[Field1]","Table1")..it returns 4
Yet when I check the microsoft site for the description of how dcount works, it distinctly says it counts distinct entries. Can someone clarify?
最满意答案
我不知道你指的是哪个页面,但DCount只是计算记录,而不是明确的值。
为了计算不同的值,我建议Allen Browne的“扩展DCount”也称为ECount功能: http : ECount
此页面还提供了有关DCount如何工作的更多信息。
I don't know which page you are referring to, but DCount simply counts records, not distinct values.
To count distinct values, I suggest Allen Browne's "Extended DCount" aka ECount function: http://allenbrowne.com/ser-66.html
This page has also more information about how DCount works.
更多推荐
发布评论