ACC2: Understanding Event Order in Version 2.0

ID: Q118762


The information in this article applies to:
  • Microsoft Access 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 : kbusage FmrHowto
Version : 2.0
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: April 6, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.