bentheimmigrant
Lost & confused
- Local time
- Today, 04:50
- Joined
- Aug 21, 2015
- Messages
- 60
Hi,
I've got a subform I made for calculating KPIs. Essentially, the parent has the quarter and year input, and links to the child. The query is fairly straightforward:
H/T: http://www.techrepublic.com/article/obtain-quarterly-records-in-access-with-the-datepart-function/
Admittedly I let access build the query, so it has some excess brackets, etc. But nevertheless, it works very well.
The KPIs are various functions in the form footer, summing and dividing and such.
What I would like to do is simply count the number of clients (i.e. unique Client_ID) in this recordset.
This is just to go into a textbox, so if it's easier to use DCount, I can do that - I just haven't been able to figure out how to write the criteria. Considered VBA, but it seems that would just be forcing an inelegant solution by sticking to more familiar territory.
As always, your help will be greatly appreciated.
I've got a subform I made for calculating KPIs. Essentially, the parent has the quarter and year input, and links to the child. The query is fairly straightforward:
Code:
SELECT Projects.*, DatePart("q",[Completed_date]) AS Qtr, Year([Completed_date]) AS Yr FROM Projects WHERE (((Projects.Closed)=True));
H/T: http://www.techrepublic.com/article/obtain-quarterly-records-in-access-with-the-datepart-function/
Admittedly I let access build the query, so it has some excess brackets, etc. But nevertheless, it works very well.
The KPIs are various functions in the form footer, summing and dividing and such.
What I would like to do is simply count the number of clients (i.e. unique Client_ID) in this recordset.
This is just to go into a textbox, so if it's easier to use DCount, I can do that - I just haven't been able to figure out how to write the criteria. Considered VBA, but it seems that would just be forcing an inelegant solution by sticking to more familiar territory.
As always, your help will be greatly appreciated.