Sum(1)

M

mlstone

I have a field that is created in a query by the expression: 1Count:Sum(1).
I can not figure out what it is counting. What exactly does the 'Sum(1)'
function count?
 
D

Danny J. Lesandrini

Well, my first guess is that someone created a table column,
or query field and named it with the number 1.

If so, this should work better ...

1Count:Sum([1])

If not, then this expression is virtually a constant, equal to one.
 
J

John Spencer

It sums 1 for every row. It is virtually the same as Count(*).

Both expressions will return 15, if there are 15 records in the group.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top