This is more of a general question I'd like to discuss as I'm learning MS Access.
Let's say that I'm in the macro builder and I've created a LookupRecord data block.
Code:
Look Up A Record In: SavedQuery
Where Condition = [SavedQuery].[TypeID] = 6
And let's say that SavedQuery is the following SQL that sums one currency field and groups by a "type" field:
Code:
SELECT TypeID, Sum(Amount) AS Total
FROM ExampleTable
GROUP BY TypeID;
This ExampleTable could have a few thousand records. And note this SavedQuery doesn't have a where clause.
My Question: In this scenario when I run that macro, will Access first efficiently find all the TypeID 6's and then sum them up
-OR-
will it execute the full query first, processing the full table, then pass that data to the macro to find TypeID 6?
I have a feeling it logically has to execute the slow way... If so does anyone know of a more efficient way to accomplish such a task in a macro? (Pull the TypeID 6's first then sum just the data I need.)
I'm just thinking about processing efficiency. Can anyone recommend some reading material as it pertains to MS Access?