After reading the Access 2003 Bible I have been attempting to speed up a generic global set/get module. What is frustrating is that there appears to be no way to quickly do a get/set other than create a unique set/get function for each global.
I have an application with 32 globals ... I think I am stuck on wanting to simplify code and having 64 functions instead of 2 seems a bit much. Am I missing something ie arrays, Queries (understanding that 64 functions are probably the fastest solution)?
In another db language there are indexable Temp Tables (only in memory) which can be accessed to the extreme ... haven't found a way to do this in Access.
Did some speed tests to quantify some of the suggestions in chapter 38 ...
function setglb(ch_fld as string va_val as variant)
function getglb(ch_fld as string) as variant
With 32 Globals;
Using Case statements a set/get on the 30th fld called 1,000,000 takes 15 seconds
Using IF Elseif took 14 seconds (not a great improvement)
function setfld(va_val as variant)
function getfld() as variant
Using setfld/getfld 1,000,000 set/get's took <= 1 second
Trying a table with a DAO query took forever
using FindFirst
I have an application with 32 globals ... I think I am stuck on wanting to simplify code and having 64 functions instead of 2 seems a bit much. Am I missing something ie arrays, Queries (understanding that 64 functions are probably the fastest solution)?
In another db language there are indexable Temp Tables (only in memory) which can be accessed to the extreme ... haven't found a way to do this in Access.
Did some speed tests to quantify some of the suggestions in chapter 38 ...
function setglb(ch_fld as string va_val as variant)
function getglb(ch_fld as string) as variant
With 32 Globals;
Using Case statements a set/get on the 30th fld called 1,000,000 takes 15 seconds
Using IF Elseif took 14 seconds (not a great improvement)
function setfld(va_val as variant)
function getfld() as variant
Using setfld/getfld 1,000,000 set/get's took <= 1 second
Trying a table with a DAO query took forever
using FindFirst