?
Solved

cnt function

Posted on 2006-11-10
5
Medium Priority
?
347 Views
Last Modified: 2006-11-18
What's the purpose of cnt() functions that is used in calculation in queries or reports

example

cnt(sum("field name")
0
Comment
Question by:maximyshka
  • 3
5 Comments
 
LVL 5

Expert Comment

by:sinjin
ID: 17918059
I have not heard of a CNT function... could it be a variable name?

 - sinjin
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 17918097
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
 
LVL 66

Expert Comment

by:Jim Horn
ID: 17918100
Or as sinjin posted above a variable, perhaps an array.
0
 

Author Comment

by:maximyshka
ID: 17918166
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
 
LVL 66

Accepted Solution

by:
Jim Horn earned 2000 total points
ID: 17918179
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question