[AccessD] Example of Class Module usage needed

Charlotte Foust charlotte.foust at gmail.com
Thu Sep 22 18:31:54 CDT 2016


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
>


More information about the AccessD mailing list