Referencing objects on forms from Standard Modules? 
Author Message
 Referencing objects on forms from Standard Modules?

I would normally ask how to do this, but I have a feeling
it would be very lengthy.  Instead if someone has a good
source were I can gain this knowledge I would appreciate
the reference.  A book would be good, other articles or
questions about this would be equal. Code samples would
be helpful as well.

I would welcome an answer if someone would post it, but I
am only hoping for a good written source that covers it.  
I have a beginners books but it doesn't even touch the
subject.

Mike



Mon, 26 Sep 2005 11:21:07 GMT  
 Referencing objects on forms from Standard Modules?
Hi Mike -

The reason you may not be finding how to do this anywhere
is because it is not normally a good idea to do this.

Depending on what you are really trying to accomplish, you
have a few options:

1)If your form is calling a method in the standard module
and it needs information about the form, you can pass the
needed information to the standard module.

2)If the standard module is trying to perform some generic
processing, its methods still could be passed the
information it needs from the form.

3) You may want to make it a class instead of a standard
module. The .NET framework does not really have
a "standard module" so the VB compiler basically turns it
into a class. So you may as well make it a class instead.

Hope this helps!

Quote:
>-----Original Message-----
>I would normally ask how to do this, but I have a feeling
>it would be very lengthy.  Instead if someone has a good
>source were I can gain this knowledge I would appreciate
>the reference.  A book would be good, other articles or
>questions about this would be equal. Code samples would
>be helpful as well.

>I would welcome an answer if someone would post it, but I
>am only hoping for a good written source that covers it.  
>I have a beginners books but it doesn't even touch the
>subject.

>Mike
>.



Mon, 26 Sep 2005 14:55:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Referencing Form Objects - Treeview in Modules

2. Referencing an instance of a control, from a standard module

3. Referencing object in form in code / Subform reference problem in code

4. Transferring standard contact data from standard contact forms into contact custom forms

5. recordset object and dao module references

6. Multiple Forms Question: Object reference not set to an instance of an object

7. Error when showing form: Object reference not set to an instance of an object

8. Referencing Form Controls from a Module

9. Referencing the Form from Which a Module Function Is Called

10. Referencing a control on a form from function in module

11. referencing a form's control from a module

12. Referencing forms in module level code

 

 
Powered by phpBB® Forum Software