Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dcount issues

Status
Not open for further replies.

Triacona

Technical User
Jun 11, 2009
462
GB

Hi all,

Thanks for a great forum! [smile]

I have a report which has a Data source PerformanceIndicators.

And I am using a DCount statement to pull information from another query EnCasesAll.

This is done in the Report DcPerformanceIndicatorsMonthlySummary

The queries run from the same between dates inputted on the form MainScreen. Between [Forms]![MainScreen].[txtStartDate] And [Forms]![MainScreen].[txtEndDate]

I have a Report Header with the breakdown for all data between dates.

I have another Header based on the Validation Date sorted by Month

The problem comes in when I use the DCount within the month header, the numbers are exactly the same as the Report Header for The Enforcements Section.

How do I split the DCount statement amongst the months??

Thanks for all your forthcoming help [smile]




Thank you,

Kind regards

Triacona
 
It sounds like you have no criteria for the DCount. Try DCount("Field Counted", "source query name", "month = " & month). If the month is stored as a string the last part will be "month = '" & month & " ' " (spaces added for clarity).
 
I would create a totals query by month that is similar to your dcount(). Then create a small sub-report based on the totals query. Add the sub-report to the month header and set the link master child to the month fields.

Duane
Hook'D on Access
MS Access MVP
 
Thanks for all the replies !!! [bigsmile]
I will try implement them as soon as possible and give feedback.

Thank you,

Kind regards

Triacona
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top