Quote Originally Posted by twgonder View Post
Cool & thanks, I'll look and learn.

In the meantime, I still wonder how Access has been useful for developers when, as how this post started, if a main & sub forms (and even two different forms running at the same time) can smash on each other's variables when they both call the same subroutine that has module or static variables that the forms use separately.
With all due respect I think you already answered this in your very first post, it comes down to you not understanding how it's supposed to work in VBA. Every language has different syntax, semantics, and ways of doing things. It's not fair to expect them all to be the same. You seem to be hung up on the word 'module' and what that meant to you in the past.

if a main & sub forms (and even two different forms running at the same time) can smash on each other's variables when they both call the same subroutine that has module or static variables that the forms use separately
That is not what is happening. The variables belong to the module, not the forms that call them (directly or indirectly). Your multiple forms are smashing on the module's variables. I'm at a loss for any other ways to explain it.

Does everything have to be turned into a class to preserve simple variables? It seems ludicrous to me and what I've experienced in computing over the past 45 years.
No. I've never had to write my own class module in VBA (disclaimer: I'm an amateur). And VBA has been around for 30 years, it's definitely not the new kid on the block.

There's always multiple ways to skin a cat. Different languages favor different coding styles/methods/approaches over others. For example, those ~30 lines of code I posted in #40 combined with appropriately designed 'configuration' tables might be enough to accomplish a large chunk of what you're trying to do without the use of any module or global variables.



Out of curiosity, what other programming languages are you referring back to?