Pat,
I think the first time the database is opened and one of the button is clicked, Access needs to maybe open the table and maybe load some/all records into memory, so the next time another button or the same button is clicked, the data or some data are still in memory and it doesn't need the extra overhead.
If you close the database and immediately reopen it and click on one of the buttons, it seems it doesn't need the extra overhead either. I guess it's because the data are still in memory.
So to get a true comparison, we need to test them under the same environment, that is, to compare either when no data is in memory or when the data is already in memory.
To carry out tests under the latter environment is a lot easier because we can simply ignore the first run when the database is started. And it's also more accurate to run each set of queries several times and compare their average figures.
In the first query of my two-query set,
"Query2a"
SELECT [Rec_Dated], [AIM_N7089]
FROM dbo_SouthVariable1
WHERE [Rec_Dated] BETWEEN (SELECT Max([Rec_Dated]) FROM dbo_SouthVariable1) -3 AND (SELECT Max([Rec_Dated]) FROM dbo_SouthVariable1);
I wanted it to return at most 4 records because though the poster said "there is a new record made everyday", I'm not sure whether Saturdays and Sundays are skipped. To return 4 records, I can be sure that, when the queries are run on Monday, the record for Friday is returned. If Saturdays and Sundays are never skipped in the table, then the query can be modified to return only 2 records, since only one record can be Null in AIM_N7089.
As the date field is indexed, this technique has the advantage that the time to retrieve four records for the second query will not increase as the number of records in the table grows.
If you directly click on the above query, you will be amazed to see how very fast it runs, even though it contains two subqueries (or more correctly, the same subquery in two different places.)
.