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?
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?
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.
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.....
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.