[AccessD] A blast from the past

John Colby jwcolby at gmail.com
Sat Oct 30 07:19:34 CDT 2021


I am also using the message class found in the blogs (with a new message
type) to raise an event, passing four pieces of data to a form with a list
box.  So in many different places in my code, functions in various
different classes, I can raise the same event and have it received (an
event sink) by the form, inserting 4 columns of data from the event into a
list control for displaying status as the system does stuff.  I raise these
events when receiving emails from Outlook, processing a database for each
client that is buying the database, cleaning out tables and inserting
client specific data, setting up properties etc. ATM it is just a way for
me to watch the code run from my control form.  It is quite a cool use for
the message class.

The nice part of using events in this manner is that I can test the various
classes without the form even loaded, raising a status message event
wherever I want to, but if the form is open, then the events are sunk and
the data placed into the list control.  I can also sink the same exact
events in a log class and log the data in the messages into a log table.
Or sink the events in an email class and send an email.  IOW these events
can be sunk in many different places and have different things done with
them based on the class that is sinking the events.

Pretty handy stuff.

On Sat, Oct 30, 2021 at 4:21 AM Gustav Brock via AccessD <
accessd at databaseadvisors.com> wrote:

> Hi John
>
> From time to time, I still refer to your articles when questions are about
> classes and WithEvents.
> There is so little written about these topics of VBA.
>
> /gustav
>
> Fra: John Colby<mailto:jwcolby at gmail.com>
> Sendt: 29. oktober 2021 23:47
> Til: Access Developers discussion and problem solving<mailto:
> accessd at databaseadvisors.com>; John W Colby<mailto:jwcolby at gmail.com>
> Emne: [AccessD] A blast from the past
>
> Blog about classes
>
>
> http://jwcolby.blogspot.com/2013/02/microsoft-access-little-secret-classes.html?view=sidebar
>
> LOL, look at the date on that.  How time flies!
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list