I want to refer to a global variable from multiple modules in Access VBA code. In reading the "books" it would appear that a "Public" variable should serve this purpose, but I can't seem to get it to be recognized beyond the module in which I declare it. How do I declare it as soon as the database opens, and what do I need to do to have it be available to any procedure throughout the current session on the database, both for using its currant value, and for changing that value?
I have a similar issue with defining a constant to be used by the database any time it opens. I want the programmer to declare a value for a public/global loop limit that he might need to adjust depending on operational user feedback. The public/global variable allows it to be set and changed in only one central place rather than having to change it in every location where it is used.
I think these are both the same issue.
Any help would be appreciated.
Simon B.