A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

counting records shown in a report



 
 
Thread Tools Display Modes
  #1  
Old March 28th, 2010, 02:36 AM posted to microsoft.public.access.reports
Becky
external usenet poster
 
Posts: 230
Default counting records shown in a report

greetings to all

I have a report bound to a query called qAttendance. The report has its
Filter property set to limit the records showing in the Detail section. So
far so good.

In the report footer, i want to show the count or records in the report.
How do I do this?? (I can get a count in forms using recordsetclone and
bookmarks, but I can't figure out a good method for reports)

Becky
  #2  
Old March 28th, 2010, 04:08 AM posted to microsoft.public.access.reports
Becky
external usenet poster
 
Posts: 230
Default counting records shown in a report

oops. Got it using DCount.

"Becky" wrote:

greetings to all

I have a report bound to a query called qAttendance. The report has its
Filter property set to limit the records showing in the Detail section. So
far so good.

In the report footer, i want to show the count or records in the report.
How do I do this?? (I can get a count in forms using recordsetclone and
bookmarks, but I can't figure out a good method for reports)

Becky

  #3  
Old March 28th, 2010, 05:09 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default counting records shown in a report

DCount() is not a reliable choice since your report may be opened with a
Where Condition which filters the records. DCount() would not be aware of
this filter. In addition DCount() opens another recordset which takes
resources.

The preferred method is to simply add a text box in the Report Header or
Report Footer sections with a Control Source of:
=Count(*)

This will always be a true count of the records in your report.
--
Duane Hookom
MS Access MVP


"Becky" wrote in message
...
oops. Got it using DCount.

"Becky" wrote:

greetings to all

I have a report bound to a query called qAttendance. The report has its
Filter property set to limit the records showing in the Detail section.
So
far so good.

In the report footer, i want to show the count or records in the report.
How do I do this?? (I can get a count in forms using recordsetclone and
bookmarks, but I can't figure out a good method for reports)

Becky


  #4  
Old April 15th, 2010, 09:02 PM posted to microsoft.public.access.reports
glj011848
external usenet poster
 
Posts: 1
Default counting records shown in a report

Just for future reference...place a text box in the detail band of your report...fill it with a 1 (just a 1).
Set the property of the text box so it will do a running total. Now, you can count any group, or total by referencing that text box. Where you reference will determing the total you get! Works great. You can keep the text box hidden for appearance sake.

Hope this helps...someday.






ref: http://codeconnect.net/microsoft-new...wn-in-a-report
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.