Distinct Count Records

Erin M 2021

Member
Local time
Today, 08:46
Joined
Apr 14, 2021
Messages
77
Another inherited report that is not counting correctly.

Here is what was written: Me!FYTDNewDonor.Value = ECount("[Constit_id]", "[FY Gifts]", "[DTE] BETWEEN #" & dFYStart & "# AND #" & dReport & "# AND ([FirstGiftDate] >= #" & dFYStart & "# or [FirstGiftDate] is Null)")

I need the distinct count of [Constit_id].

Thanks in advance!
 
Hi. Perhaps, if your regional settings is not US, you could format the dates in US or ISO? For example:
Code:
..."[DTE] BETWEEN #" & Format(dFYStart, "yyyy-mm-dd") & "# AND...
 
if you are using the function created by Allen Brown, there is an additional parameter for distinct
ECount(Expr As String, Domain As String, Optional Criteria As String, Optional bCountDistinct As Boolean) As Variant
 

Users who are viewing this thread

Back
Top Bottom