As is often the case, I have a differing view with respect to others who try to avoid the DFunc calls. Trust me, DFunc calls are anything but defunct.
Look at the following paragraphs and tell me if this makes sense to you. DFunc calls tend to have DFunc( [Field], recordsource, criteria ) in them. So think about how this call actually executes.
You start with an empty string. Drop a "SELECT " then optionally insert keyword and brackets depending on things like DMax drops in "Max(" and ")" ; DMin drops in "Min(" and ")" - you can figure out the others. So drop in the leading keyword, field specifier, trailing parentheses, and keyword " FROM ". So far, you have "SELECT [field] FROM" or "SELECT Max([Field]) FROM" ...
Now put in the recordsource name, which is usually a table or query, right? So now you have "SELECT Count( [Field] ) FROM recordsource"
Then if the criterion field isn't blank, drop in keyword "WHERE " and the literal or concatenated criterion field. Add in a semicolon. What do you have? An SQL string, "SELECT Avg( [field] ) FROM recordsource WHERE selection-criteria ;"
So the function can then open a recordset based on a dynamic SQL string. If this was specified correctly, you get back a unique entry for the dynamic SQL recordset, usually based on a single field. Now open the recordset and read the first (hopefully, ONLY) record. And there is your answer. (Don't forget to close what you open...) The DFunc calls (Domain Aggregate functions) just build a dynamic SQL string using SQL Aggregates.
Read Allen Browne's code and you will see that he creates the same sort of thing. He claims it is faster than the DFunc calls, but I'm hard-pressed to see how. Any time you create your own SQL string, you've already slowed yourself down because such a string is not pre-parsed.
Given that most computers are able to execute thousands of instructions in the time required for a single disk seek, the difference between "rolling your own" function or just using the DFunc functions is going to be overwhelmed (underwhelmed?) by the speed of the disk as it seeks the data you want. Trust me, if you have a 7200 RPM disk, which is typical, you are looking at latency of 8.333 msec/rotation, which for a 1 GHz machine is still 8.33 MILLION clock cycle, probably 3 million instructions. You can do A LOT if you have 3 million instructions to do it in.
Therefore, from the pragmatic viewpoint, unless there is a very special situation to be considered, I always use the DFunc calls as opposed to "rolling my own" - because in most cases the return on the investment of my time is too small to be worth it. Stated another way, I only re-invent wheels where it does me a lot of good to do so, such as where the wheels I have are broken.
The DFunc tools are valid parts of your toolkit and I see no issue in using them when they correctly address the question you need to ask. Just think of a DFunc call as a "spot SQL query based on a dynamic string" and you know everything you need to know about the call.
Let's take a look at efficiency. The SQL Aggregate functions for Max, Min, Count, Avg, etcl would all be compiled to machine code, I would think. If you tried to roll your own versions of the call using VBA, that is NOT compiled code - it is pseudo-compiled into p-code - so cannot be faster than a compiled intrinsic function.
All that is left to consider is the amount of time it takes your function or Allen Browne's function or somebody else's function to build the dynamic string. How much is THAT going to cost you? Not a lot of time, but even there, DCount as an intrinsic library function is ALSO compiled to machine code. I'm at a loss to figure out how anyone thinks they will save that much time over the compiled functions already in the Access .DLL file libraries.
Not that I'm a fan of everything that Microsoft writes, you understand, but I just have a lot of problems with re-inventing wheels when the ones you have are rolling nicely already. Not to mention that re-inventing wheels might be an act of disloyalty to your employer, who wants you to avoid wasting time on things that you don't need to do.
Since I don't claim to know every problem, I can't claim to know that "line in the sand" when the DFunc calls become too cumbersome for your application. But if you take into account time to program vs. the miniscule advantage you get for most case, I would suggest that you use the DFunc calls whenever you can.