[AccessD] Standard vs. Class Module

Jim DeMarco Jdemarco at hshhp.org
Wed Feb 5 07:38:00 CST 2003


AFAIK, A97 does not support interfaces (that is, the Implements keyword).  Do you know otherwise?
 
Thanks, 

Jim DeMarco 
Director of Product Development 
HealthSource/Hudson Health Plan 

-----Original Message-----
From: John W. Colby [mailto:jcolby at colbyconsulting.com]
Sent: Monday, February 03, 2003 9:47 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Standard vs. Class Module


Access does not have inheritance.  Or rather, it can have interface inheritance but not behavior inheritance.  
 

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-admin at databaseadvisors.com [mailto:accessd-admin at databaseadvisors.com]On Behalf Of Arthur Fuller
Sent: Monday, February 03, 2003 8:04 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Standard vs. Class Module


Do your forms inherit from some master, or do you have to implant this logic? I.e. can we create form classes and inherit from them? And with them, their constituent control logic/instances?
 
Obviously I haven't investigated this stuff much or I would know the answer :-)

----- Original Message ----- 
From: John W. Colby <mailto:jcolby at colbyconsulting.com>  
To: accessd at databaseadvisors.com 
Sent: Monday, February 03, 2003 7:04 PM
Subject: RE: [AccessD] Standard vs. Class Module

A module is simply a container for code, nothing more.  A module can contain global variables, local variables, functions, subs etc.  In the end however, it is just a container full of code.
 
A class module defines a class, and holds code and variables that implement the methods and properties of that class.  A class is a template for an object and an instance of that object (class) will be loaded when you set a variable = to that class.  in other words.
 
dim lMyClass as MyClass
   set lMyClass = new MyClass
 
You use classes to create an object which will load into memory and do something.  
 
In my framework I have classes for each type of control that Access provides.  One of my classes is for text boxes.  Whenever a text box is opened on my forms, I load a class and pass a pointer to the text box that just opened.  The text box class can now implement behaviors for that specific text box that "belongs to it" (or v.v.).  For example whenever the text box gets the focus, I can cause the background to change colors.  Or I could compute a value based on the value it already contains * the value of some other control.  
 
So a class contains the code for an object.  When you dimension a variable of type (whatever your class name is) and then set the variable, you load an instance of the class.  You can have just one, or a hundred instances of your class.  When my forms load, I have an instance of my text box class for every text box on my forms.  

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-admin at databaseadvisors.com [mailto:accessd-admin at databaseadvisors.com]On Behalf Of Myke Myers
Sent: Monday, February 03, 2003 6:44 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Standard vs. Class Module


Can anyone describe how to determine when to use a standard module and when to use a class module in Access?
 
TIA    Myke
 



***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030205/2e291216/attachment-0002.html>


More information about the AccessD mailing list