Results 1 to 4 of 4
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Is an Event the same thing as a Method?

    In the object hierarchy, events and methods are classified separately. However both of these are examples of an object performing an action. So my questions are:

    1. Is an Event the same as a Method?
    2. If not, then how are they different?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Never gave it much thought. Perhaps this will answer http://office.microsoft.com/en-us/ac...080755467.aspx.

    Seems to me methods can be invoked from an event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Access is 'event driven'. This means the fundamental design by Microsoft is that a human is operating the database, and it is not an exe that is running by itself. Therefore the database will just sit there until an event is triggered, by the human. The only slight exception to this is the timer feature in the form properties. Microsoft offers a variety of events that can tactically & creatively be used as the trigger point for code - these are found in the form & report object properties (i.e. Open Event) and quite a few of the controls have events in their properties (i.e. AfterUpdate).

    Method is a general reference to coding approaches and is not unique to Access..i.e. using the Select Case method rather than If/Then method......there is no official application of the term 'method'.....whereas 'event' does have the specific meaning to Access coders as to referring to those events offered in the various objects mentioned above.....

    hope this helps.....

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Not quite accurate. An "event" is something that happens - a form is opened, an control is updated, a record is deleted and so on. For example, opening a form causes all sorts of "events" to occur; how Access responds to those events varies; it always does something by default, even if it is "behind the scenes", so to speak. Database developers - you and me and everyone else here - can make it do other things too in response to those events through the use of macros and/or code subroutines called Event Procedures - this is where VBA comes in.

    Access "methods" on the other hand, are actions that are associated with access objects (and there are far more objects that have methods than have events). Take, for example, a recordset. The actions of moving between records, editing, adding or deleting records are "methods". The familiar DoCmd is an object which has dozens of methods.

    The term "method" in Access does not have the same meaning as it does in English, where a "method" is a way of doing something, as in a method of mowing a lawn.

    So really an event is not the same as a method in MS Access' terms.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 09-15-2017, 11:25 AM
  2. Another Hopefully Simple Thing!!!
    By Z1nkstar in forum Access
    Replies: 6
    Last Post: 05-13-2014, 07:12 AM
  3. I need a very simple thing!!
    By Z1nkstar in forum Access
    Replies: 2
    Last Post: 05-12-2014, 12:36 PM
  4. How's This SubForm Thing Done?
    By abrogard in forum Forms
    Replies: 6
    Last Post: 07-13-2012, 10:55 PM
  5. Probably a Strange thing to ask
    By everette in forum Access
    Replies: 3
    Last Post: 03-26-2011, 08:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums