Help!! Problem Counting records in a report

Steve78

Registered User.
Local time
Today, 08:42
Joined
Feb 24, 2006
Messages
13
Hi Everyone,

I need some help counting records displayed in a report.

I have a search form that has two text boxes, txtStartDate and cmbCourseName. These values are passed into a search filter built in VBA which then passes everthing to a blank query that the report is built from. All this works ok.

But I would like to display how many records it returns in the footer of the report. I have tried =Count(*) and =Count([ContactID]) but both just return errors at the bottom of the report. Can anyone explain how to count the number of records returned in a report.

Thanks in advance,

Steve
 
Steve78 said:
Hi Everyone,

I need some help counting records displayed in a report.

I have a search form that has two text boxes, txtStartDate and cmbCourseName. These values are passed into a search filter built in VBA which then passes everthing to a blank query that the report is built from. All this works ok.

But I would like to display how many records it returns in the footer of the report. I have tried =Count(*) and =Count([ContactID]) but both just return errors at the bottom of the report. Can anyone explain how to count the number of records returned in a report.

Thanks in advance,

Steve

if it's a total, stick it in a report footer.
else
=Dcount("[CONSTANT FIELD]","Query")
 
Working now Cheers!!!

Thanks for replying Mike. =DCount("[ContactID]","qContactsHist")
worked fine, I'm now able to see how many records are returned in the report.

Just one more question though, can I make the count unique? Currently it is counting all the instances of ContactID. I think it could have something to do with Select Distinct and have tried a couple of versions of this but nothing worked. Any thoughts?
 

Users who are viewing this thread

Back
Top Bottom