David said:
I modified a system and added a few DLOOKUP and DSUM statements and the
system now runs much more slowly. Are these to blame? Are there any faster
alternatives?
Would it be faster to open and close a recordset and run an SQL. How
would I do that.
These functions are much maligned, but mostly for the wrong reasons. Every
use of a Domain Aggregate function creates a new pointer to the Current
Database and all of the DB collections are refreshed before that instance
is created. For this reason they are not good choices to use in code loops
or queries and it is not a good idea to create a form or report where a
dozen or more of these functions are going to fire off when opening or
navigating. As long as they're not used in those circumstances they are
fine and should perform as well as a Recordset.
Many believe that they do not take advantage of indexes in the tables and
that is just flat incorrect.