ACC2: Understanding Event Order in Version 2.0

Last reviewed: April 2, 1997
Article ID: Q118762
The information in this article applies to:
  • Microsoft Access version 2.0

SUMMARY

Moderate: Requires basic macro, coding, and interoperability skills.

In order to automate tasks in Microsoft Access successfully, it is helpful to have an understanding of the Microsoft Windows event model. Objects in Microsoft Access respond to many types of events, such as mouse events and keyboard events. Events are also triggered in response to record movements. There are several ways to determine the order of events for forms, reports, subforms, and subreports in Microsoft Access.

Below is a description of a form in sample database NWIND.MDB that allows you to experiment with and view the order of events.

MORE INFORMATION

There is a special version of the Orders form in the sample database NWIND.MDB called the Show Events form that records each event as it occurs. When you open the Show Events form, an accompanying form called Event History opens as well. The Event History form lists the events that occur in the Show Event form. As you use the mouse or keyboard to select or change controls in the Show Events form, the list in the Event History form changes to show all the events that have occurred. Note the events that occur as you use the mouse and keyboard to manipulate objects in the Show Events form. The Show Events and Event History forms can help you to understand the concept of events, and the order in which they occur.

The recording of events in the Show Events form is accomplished by a function called ShowEvent(). The ShowEvent() function is called in the event procedures of all the event properties of all the controls on the Show Events form. The ShowEvent() function sets the value of the text control to include the event that just occurred.

REFERENCES

For more information about event order, search for "order of events" then "Order of Events" using the Microsoft Access Help menu. The Order of Events topic includes the following topics:

  • Events for Controls on Forms
  • Events for Records on Forms
  • Events for Forms
  • Events for Keyboard and Mouse
  • Events for Reports and Report Sections
  • Events and Saving Data

Microsoft Access "Building Applications," version 2.0, Chapter 8, "Events," pages 184-201


Keywords : FmrHowto kbusage
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.