Unanswered: Storing/Initializing Globals from a table
I'd like to store some basic system and informational variables in a table that would be easy to edit with a form. Things such as taxrate, program support phone#, version#, url for updates, etc.
So, I set up a table with fields autonumber, variablename, type, value, description. I then populated the table with 20 or so useful constants, then made up an easy form to edit them all in. I also manually set up
So far, so good. However, I am not sure how to auto declare each as public, then initialize each with their type and value from the table.
I don't know how to do your autodeclare the way you want. Here is what I do.
I use a parameters table, but do not autopopulate the variables. I use a function to do that.
My table - tblAppParms - has ParmID (autonumber), ParmName (text 255) and ParmValue (memo). Each Parm has it's own get function to populate the predeclared global value. I store all sorts of global parms here that may or may not change from one use to the next.