[AccessD] Example of Class Module usage needed
John Colby
jwcolby at gmail.com
Sat Sep 24 20:02:57 CDT 2016
I would not code in Access without them. :)
On 9/23/2016 9:38 AM, Jim Dettman wrote:
> <<Classes are swiss army knives in Access. >>
>
> I find there are very few that bother to use them.
>
> More often then not, it's just straight code. The real power in using
> classes is lost in VBA because it does not have full inheritance. VBA is
> object based, bit not object orientated like you have in a fully compliant
> OOP language.
>
> Jim.
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Charlotte Foust
> Sent: Thursday, September 22, 2016 07:32 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Example of Class Module usage needed
>
> Classes are swiss army knives in Access. You can use them for all sorts of
> things, not just to represent something like a table. For example a
> Customer class might return the customer name information, all the
> associated addresses from the Address table, Order history for that
> customer, etc. In a simple Access databases, there isn't much point, but
> where relational information is structured properly, they can be a quick
> and direct way of returning requested information from multiple tables or
> accepting input and writing it to the appropriate table.
>
> One of my favorite uses is to declare a clsForm and pass it the form object
> it should work on. That will allow binding the open form to an instance of
> clsForm and putting uniform behavior or procedures you want available in
> all forms in the class.
>
> Charlotte Foust
> (916) 206-4336
>
> On Thu, Sep 22, 2016 at 1:22 PM, <ewaldt at gdls.com> wrote:
>
>> I've been automating Access and Excel for years, but never got involved in
>> creating class modules (except the ones behind forms and reports, of
>> course). I'm now in the process of converting one of my Excel projects
>> over to using a class module, and I can see where it's going to be useful
>> (very quick, too). In this case, the class basically a more capable, more
>> flexible array, with some methods built in. I'm having trouble envisioning
>> why they would be needed in Access, though. Obviously they ARE needed, but
>> I don't see it. Other than the built in methods, it seems like tables and
>> arrays would handle everything. Would anyone like to offer an example of
>> how you would use them?
>>
>> Thanks in advance for any help (and patience).
>>
>> Tom Ewald
>> Mass Properties
>> General Dynamics Land Systems
>>
>> ----------------------------------------------------------------------
>> This is an e-mail from General Dynamics Land Systems. It is for the
>> intended recipient only and may contain confidential and privileged
>> information. No one else may read, print, store, copy, forward or act in
>> reliance on it or its attachments. If you are not the intended recipient,
>> please return this message to the sender and delete the message and any
>> attachments from your computer. Your cooperation is appreciated.
>> &&
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
--
John W. Colby
More information about the AccessD
mailing list