cnt function

What's the purpose of cnt() functions that is used in calculation in queries or reports

example

cnt(sum("field name")
maximyshkaAsked:
Who is Participating?
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
Perhaps the previous developer intended to type =Sum(Count([OCL])), and made a mistake.

One way to know for sure, hit your {f2} key to go to the Object Browser, search for cnt, and see what it finds.
0
 
sinjinCommented:
I have not heard of a CNT function... could it be a variable name?

 - sinjin
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Double-click on the cnt, then right-click:Definition, and see what pops up.

Either cnt is a function/sub used by another object model not commonly used in Access, or it is a custom public function/sub.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Or as sinjin posted above a variable, perhaps an array.
0
 
maximyshkaAuthor Commented:
It is used in report footer (report created by someone else)

=Sum(cnt([OCL]))

OCL is one of the fields in table.  I don't think definition will work there
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.