[AccessD] Find First in an Array?

jwcolby jwcolby at colbyconsulting.com
Wed Feb 18 18:38:23 CST 2009


Are you going to cache by form then controls on the form?  Will you load (cache) an entire language set?

clsXlateSupervisor
clsXlateFrm

May I suggest a pair of classes?  One class holds all the translations for a form, the second is the 
supervisor that holds all of the form classes.  As the form loads, it calls clsXlateSupervisor 
passing in it's name.  Back comes a clsXlateFrm instance for that form.  The form then simply passes 
it's control collection to the class.  The class iterates the collection, pulls out the translation 
value and places it in the correct property.

BTW, using a cache like that will make it wicked fast.  Of course you have to load the cache.  My 
suggestion would be to load the translation for each form the first time that form is opened, 
caching the data into the class.  Then after that as the form opens the data is loaded and off you go.

Tell us what your translation table looks like and I will show you how to do this.

John W. Colby
www.ColbyConsulting.com


Rocky Smolin at Beach Access Software wrote:
> 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/> 
> 
>  
> 
>  
> 
> 



More information about the AccessD mailing list