Glowackattack
Registered User.
- Local time
- Today, 16:06
- Joined
- Feb 26, 2008
- Messages
- 126
Hi,
I have a query built and what i want to do is count the number of records that meet date criteria. To illustrate, these are the fields i need
Company, Branch, Count of records within past month, Count of records within past 3 months, count of records within past year, Count of records within past 2 years, etc.
I'm trying to do this using the Dcount function to compute each of the count fields
Cnt_PastMonth: DCount("Company","Tbl_Caseoverview","[Tbl_CaseOverview]![Placed Date] > " & DateAdd("m",-1,Date()))
Cnt2_Past12Months: DCount("Company","Tbl_Caseoverview","[Tbl_CaseOverview]![Placed Date] > " & DateAdd("m",-12,Date()))
My second count field shows up as dates and not as integers when the query is run...
Am I doing this correctly?? Or is there a better way to do it??
Thanks for your help in advance,
I have a query built and what i want to do is count the number of records that meet date criteria. To illustrate, these are the fields i need
Company, Branch, Count of records within past month, Count of records within past 3 months, count of records within past year, Count of records within past 2 years, etc.
I'm trying to do this using the Dcount function to compute each of the count fields
Cnt_PastMonth: DCount("Company","Tbl_Caseoverview","[Tbl_CaseOverview]![Placed Date] > " & DateAdd("m",-1,Date()))
Cnt2_Past12Months: DCount("Company","Tbl_Caseoverview","[Tbl_CaseOverview]![Placed Date] > " & DateAdd("m",-12,Date()))
My second count field shows up as dates and not as integers when the query is run...
Am I doing this correctly?? Or is there a better way to do it??
Thanks for your help in advance,