[AccessD] =function() in .onclick

Charlotte Foust cfoust at infostatsystems.com
Tue Jan 13 15:56:03 CST 2004


They have somewhat different purposes.  Implements allows you to
subclass an existing object/class and give it additional or different
functionality, so you can have a class Dog and a subclass Spaniel that
has a property Retriever.  WithEvents allows you to monitor the events
of an object/class.  You can intercept and respond to specific events
when they happen in the object.  Did the Bark event trigger?  WithEvents
lets you find out and respond from another class/object.

Charlotte Foust

-----Original Message-----
From: Robert Gracie [mailto:Subscriptions at servicexp.com] 
Sent: Tuesday, January 13, 2004 1:45 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] =function() in .onclick


Hello All,
 Since I'm just learning this type of programming technique I thought I
would ask a question...

  Why not use Implements instead of WithEvents?  My limited understand
of WithEvents is that they will not return functionality unit they (the
event) has completed processing... Since I'm just at the "door" so to
speak with learning how to use and incorporate these new (to me)
programming techniques into my work, I really want to start out using
the "best" technique...


Robert Gracie
www.servicexp.com












-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Tuesday, January 13, 2004 9:44 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] =function() in .onclick


Chris,

I credit Shamil with teaching me everything I know about Withevents.  I
would never have discovered them, and would not be where I am today in
Access without his examples and his prodding to look at WithEvents.

If you looked at Shamil's stuff you will see where he places the [Event
Procedure] in the control's event procedure using code inside the Init
event of the class itself as the class instantiates.  That is where I
learned to do this and one reason I so dislike developers putting
function calls in those properties.

I used to use the tag property a lot using ADH code to set and read
them. Once I started using classes I moved away from that to either
setting properties directly in the class init or (in the case of my
scanner, where it's more generic) using class properties to set these
values later.  There are pluses and minuses to using the tag - the
control carries it's initialization properties with it, but if any other
developer uses the tag yours can get trashed.  I finally just stopped
using it although there is still ONE place I do, and that is in my Just
In Time form loading, where I place the form name in the tag.  If it's
there it will do JIT, otherwise it just loads normally.

I would like to thank you though for the hint about input masks.  My
users have been pushing me to "standardize" the date inputmasks and
using my framework I can do just that quite easily.

John W. Colby
www.ColbyConsulting.com



_______________________________________________
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