DCount Issue?? (1 Viewer)

MrDix

Honor Courage Commitment
Local time
Today, 05:51
Joined
Apr 22, 2005
Messages
10
Hi - I am having an issue with the Dcount funtion on my report.
I have a report base on two tables: tblCustomer and tbl Cases

I have the following on my Report Footer:

Customer: =Count([pkCustomerID])
Case: =Count([pkcaseID])

My problem I come out is:
Customer = 5
Cases = 5

The Cases Total are good but I only have 3 Customers one Case for each cutomer plus 2 extra cases for one Customer which makes 5 Cases but Only 3 Customer.

Is there is way to display the right total for My Customer = 3

Any one Please, some help Thank you. :confused:
 

MrDix

Honor Courage Commitment
Local time
Today, 05:51
Joined
Apr 22, 2005
Messages
10
I have a call center database
Where I can have one customer but many cases.

So, right now for testing purposes I only have 3 customers added but I had added 5 cases total:

So, I get the right total cases which is five but I can not get the right total customer which is only 3 customers.

I hope it makes some sense -- that is what I can not figure out how to just display the right total of customer --
 

Newman

Québécois
Local time
Today, 06:51
Joined
Aug 26, 2002
Messages
766
By using the Count() function in the footer of your report, you're actually counting the number of these fields in the record source of the report. This is why they will always contain the same number.

You have to use DCount([pkcaseID], CaseTable, WhereCondition), where CaseTable is the table containing you case and WhereCondition is a string that contains an expression that filters your data.

An exemple of this :
Case : =DCount("[pkcaseID]", CaseTable, "[caseDate]>=#01-01-2000#") ' All cases of this millenium
Customers: = DCount("[pkCustomerID]", CustomerTable, "[customerCity]='Montréal' ") ' All customers from Montréal
 
R

Rich

Guest
Why not just add a group for the customer and use the RunningSum property or even the Count in the group footer?
 

MrDix

Honor Courage Commitment
Local time
Today, 05:51
Joined
Apr 22, 2005
Messages
10
Thanks

Hey Guys Thank you. I got it this time I actually created the Report from scratch instead of using the wizard and it did the trick. Not Sure, what i was doing before but Thank you Much for the info. It help me out alot.

Sincerelly, MrDix
 

Users who are viewing this thread

Top Bottom