[AccessD] T functions v. D functions

Rocky Smolin rockysmolin2 at gmail.com
Wed Aug 11 12:49:44 CDT 2021


I don't have it but have written quite a few.  What I did learn about
Domain function is that they are 'slow' but they're really fast for a
one-off in your code.  Where they really get bogged down is when they're
embedded in a loop, and maybe executed hundreds or thousands of times in
that loop.

DLookup can be replaced by a line of code doing a FindFirst on a DAO
recordset - particularly fast if the field being searched on is indexed.
Opening the recordset with that filter in a where statement might be even
faster.

DCount can be replaced by opening a recordset with that filter, doing a
.MoveLast and then the .RecordCount will give you the count. I never did a
timing test to see if this is significantly faster than the Domain
function, but someone here probably has.

DMin and Dmax the same - open the DAO recordset with a sql statement that
you copy from the QBE grid in the query designer in the View SQL mode.

That's what I know.

HTH

r

On Wed, Aug 11, 2021 at 9:08 AM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> Somewhere I got some functions that replaced the D* funtions: Dcount etc.
> Allegedly they were faster. Do you have this module? If so please send it.
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list