PC Review


Reply
Thread Tools Rate Thread

counting records shown in a report

 
 
Becky
Guest
Posts: n/a
 
      28th Mar 2010
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
 
Reply With Quote
 
 
 
 
Becky
Guest
Posts: n/a
 
      28th Mar 2010
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

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      28th Mar 2010
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" <(E-Mail Removed)> wrote in message
news:2FBFD7CB-B4C7-420F-B1BF-(E-Mail Removed)...
> 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


 
Reply With Quote
 
glj011848
Guest
Posts: n/a
 
      15th Apr 2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Limit records shown in report Duane Hookom Microsoft Access Reports 3 22nd Feb 2010 09:50 PM
Limit Records Shown Per Report Tia Microsoft Access Reports 5 17th Feb 2010 07:01 PM
RE: Limit records shown per report Tia Microsoft Access Reports 0 10th Feb 2010 08:38 PM
Limit records shown per report Tia Microsoft Access Reports 6 9th Feb 2010 06:21 PM
Limit number of records shown in a sub-report =?Utf-8?B?c2FtIGF0IFVN?= Microsoft Access 11 9th Feb 2006 09:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 PM.