when trying to allocate resources, instinct is to create a mess of recordsets, memory arrays, and loops.
this demo takes a SQL approach.
the real-world application (from which this demo is drawn) is 10x faster with the SQL approach compared with an earlier memory-array approach. apart from the need to devise a relatively ugly query, it is also way simpler to code.
DAO reference required.
db is A2K format
izy