ACC2000: Understanding Event Order in Microsoft Access 2000 (208781)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208781
Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SUMMARY

In Microsoft Access, a single action, such as clicking the mouse or pressing a key, can trigger several different events that occur in a particular order. Knowing when and in what order events occur can help you to create macros and procedures that run in response to specific actions.

MORE INFORMATION

The sample downloadable database Orders.mdb has two forms called ShowEvents and EventHistory that can help you learn the order of events in Microsoft Access. If you use the ShowEvents form, Microsoft Access automatically opens the EventHistory form and displays all the form and control events in the order they occur in the ShowEvents form. For example, as you click the mouse, select a field, and press TAB to move through controls or move from record to record in the ShowEvents form, these events are listed in the EventHistory form.

The listing of events is accomplished by an event procedure called ShowEvent that is assigned to all form and control event properties in the ShowEvents form. Each time the ShowEvent procedure is called, it sets the value of a text box control in the EventHistory form to include the event that has just occurred in the ShowEvents form.

How to Obtain the Sample File Orders.mdb

The following file is available for download from the Microsoft Download Center:
The bapp2000.exe file contains the following files:
   File name        Description 
   Orders.mdb       Orders sample application  
   Orders9.hlp      Help file for the Orders application  
   Orders9.cnt      Table of contents for the 
                    Orders application Help file  
   Solutions9.mdb   Developer Solutions sample application  
   Soltn90.hlp      Help file for the Developer Solutions application  
   Soltn90.cnt      Table of contents for the Developer Solutions application Help file                             
				
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

REFERENCES

For more information about event order, click Microsoft Access Help on the Help menu, type find out when events occur in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MinorLast Reviewed:5/30/2006
Keywords:kbhowto kbinfo kbusage KB208781