Count function

mlamont

Registered User.
Local time
Today, 08:28
Joined
Jun 25, 2001
Messages
45
I need to count the number of records that are on my report. I cannot use the count function in the query that provides the report with its information.

Can anybody help me?
 
Are you going to use the total to calculate something later? Is that why you need the record total in the query?

If you you are having problems with the TOTALS (sum, count,etc.) function, then please be alittle more specific.

If you just want to count the total number of records so that you can display the total in the report...then just use
=Count([YourField])

That will just count all of the records that appear in your report. I would suggest using your Primary key to count though...it's more reliable.:)
 
One more question...

Thank you very much, I just have one more question. The report that I am working on has a field whose value will either be "Open" or "Closed".

Do you know how I can use the count function to count the number of reports in the report with the fields value being "Open" and the same for "Closed"?
 
Without searching too hard I don't seem to be able to find a CountIf function. This being the case then I would create a 2 textboxes in the detail section. The first would have: Iif(txtOC="open",1,0) and the other would be Iif(txtOC="Closed",1,0) where txtOC is the name of the textbox showing open/closed. Set these 2 new textboxes to visible=no. Now in the footer you can summ the values of these 2 boxes to get the totals.

HTH and hope that someone else can find a simpler way!
 

Users who are viewing this thread

Back
Top Bottom