[AccessD] Find First in an Array?

jwcolby jwcolby at colbyconsulting.com
Wed Feb 18 22:55:32 CST 2009


 From experience I would estimate that using a class / collection system, the entire setup of a 
complex form as it loads would be well under 50 ms once the data is in the cache.  I am not an array 
kind of guy so of course I am biased, but a class / collection system would be extremely easy to 
build and maintain.

I never liked arrays because of the programming required.  "Searching" an array is a VBA program. 
Indexing into a keyed collection is no code and behind the scenes is all low level language (fast).

I am willing to do the class system if for no other reason than to add to the class discussion.  If 
anyone wants to do it with an array we can compare results.

It should be fun.

John W. Colby
www.ColbyConsulting.com


Bobby Heid wrote:
> Rocky,
> 
> I would also recommend that you try out collections as people suggested
> earlier.  But I would also try an array to compare the speeds of lookups
> based upon how many items you have.  For the array approach, if the items
> are sorted, and there are over 100 items, I'd recommend searching using a
> binary search - very fast.  You could even use an array of structures.
> 
> I would do up a little test module to test using a collection and an array.
> Make sure you search for stuff that may be near the top, middle, and the
> bottom.
> 
> Thanks,
> Bobby




More information about the AccessD mailing list