I'm in the process of creating a class module in an Access database. To keep this simple, I'll call it "ModuleX." I instantiate ModuleX on FormA. I'll call the instantiated object on FormA "MX." Unfortunately, I need MX on FormB. I want to clarify here that the instance of MX I need on FormB is not a newly instantiated version, but the original instance from FormA. I was able to solve the problem by creating a public declaration for MX on a standard module, but this seems a little sloppy. I've been told by a number of co-workers that global variables are dangerous. Is there a better way to pass MX from FormA to FormB? Or, is my construct the way to go?
Start Free Trial