I have a "Configuration table" which is intended to hold data that 
might be used as global constants throught the program, modules and 
forms. Each row is a different constant. I think I can write the 
function to assign the data to a variable if I could only figure out 
how to get the data from a particular row without creating tables or 
putting a control on a form just to access the table. The table has 4 
fields, namely:

Sequence   = A Sequential Number
ConstName  = Text that holds the Constant identifier name
ConstValue = Text that holds the Constant's actual value

As an example, a row might contain: 

1, "MAIN_PATH", "C:\TEMP_PLACE\"

To search on the key phrase "MAIN_PATH" I would want to return the 
value "C:\TEMP_PLACE\" as a TEXT result. Therefore the function would 
be something like:

FUNCTION ConstLookup (sSearchText as String) AS String

So since I want to assign these before the first form is done loading 
how can I use SQL to extract the one record that I want per constant 
and then put the matching value ("C:\TEMP_PLACE\" in my example) into 
a global variable without using other temporary tables or unneeded 
form controls?






Reply via email to