ACC1x: Microsoft Access Closes Abnormally from a Macro |
Q109366
The information in this article applies to:
- Microsoft Access versions 1.0, 1.1
SYMPTOMS
When Microsoft Access is unexpectedly closed by a macro, system resources are not released, and Microsoft Access remains in the Microsoft Windows Task List even though the application is no longer available.
CAUSE
The abnormal closing of Microsoft Access is due to event timing in the macro. The macro opens the Categories table, calls the Replace In Field dialog box, and then closes the Categories table. However, the Replace In Field dialog box, by design, functions differently than other dialog boxes do by allowing macros to continue running while the dialog box is displayed. Because the macro continues running the Categories table is closed before the replace action is completed. There is no macro action to pause the macro's execution; macro events occur sequentially unless a modal dialog box requests input from the user. The fact that the table is closed before the replace action is completed causes Microsoft Access to close abnormally.
When Microsoft Access closes abnormally in this way, it does not relinquish memory or system resources as it should.
STATUS
This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION
Steps to Reproduce Behavior
WARNING: Make sure to save any open work on your computer before following these steps. Following these steps will cause Microsoft Access to quit; any open work will not be saved.
- In Program Manager, choose About Program Manager from the Help menu. Note the amount of free system resources. Choose OK.
- Start Microsoft Access.
- Open the sample database NWIND.MDB.
Create the following new macro:
Action ------------------------------- OpenTable Table Name : Categories View : Datasheet Data Mode : Edit DoMenuItem Menu Bar : Table Datasheet Menu Name : Edit Command : Replace Close Object Type: Table Object Name: Categories
- Run the macro.
- In the Replace In Field dialog box, choose Close. Microsoft Access will close abnormally.
- Press CTRL-ESC to open the Task List. Double-click Microsoft Access. Note that you cannot switch to Microsoft Access because it is no longer available.
- Double-click Program Manager.
- From the Help menu, choose About Program Manager. Note that the system resources used by Microsoft Access have not been released.
Additional query words: abnormal termination close
Keywords : kbusage
Issue type : kbbug
Technology :
Last Reviewed: November 4, 2000 |