[AccessD] Find First in an Array?

Bobby Heid bheid at sc.rr.com
Wed Feb 18 21:21:01 CST 2009


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

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Wednesday, February 18, 2009 5:57 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Find First in an Array?


Dear List:
 
I have an app set up for multiple languages.  The translations are pulled
from a table at the time the form or report is opened by cycling through the
controls (labels and button captions) and getting the appropriate
translation.  To make the thing run faster (there's a noticeable translation
delay), I'm thinking of loading these translations into an array in memory
and fetching the translation from the array.  However, AFAIK, there's no
equivalent to a FindFirst in an array like there is in a recordset.  So, is
there a better way to find the right translation in the array short of going
through the array in sequence for each item to be translated?
	
	
MTIA for any ideas,
 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list