Advertisement

05.01.2008 at 10:00PM PDT, ID: 23370757
[x]
Attachment Details

Passing Instantiated Objects

Asked by jdana in VB Objects, Access Forms, Access Coding/Macros

Tags: Microsoft, Access 2003

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
 
Loading Advertisement...
 
[+][-]05.01.2008 at 11:05PM PDT, ID: 21484802

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 02:08AM PDT, ID: 21485367

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 05:18AM PDT, ID: 21486019

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 05:37AM PDT, ID: 21486131

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 05:55AM PDT, ID: 21486204

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Objects, Access Forms, Access Coding/Macros
Tags: Microsoft, Access 2003
Sign Up Now!
Solution Provided By: MikeToole
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628