*************
* Background *
*************
I need to store and update data in a load of global variables:
- When I load up forms I pre-populate the fields with this data.
- When controls are changed the global fields I update the globals
I have sucessfully defined my variables in a module like this:
' Setup globals
Global gblUser As Integer
Global gblSampler As Integer
Global gblProject As Integer
Global gblExportPath As String
*************
* The problem *
*************
When I hit an error all the globals are lost (reset to default non-initiated values - "" or null or something).
********
* Ideas *
********
- Everytime I call a global I check it's not blank - if it is I reset globals to defaults.
- Save the values of globals in a db table.
- Open a form and set controls in this form to the global values. Grab / update the data straight from here.
***************
* My question!!! *
***************
What is the best way to store "globals" in Access?
Please feel free to add your own ideas - preferably really good ones :oD
Start Free Trial