ACC: How to Create an AfterUndo Form EventLast reviewed: October 24, 1997Article ID: Q123595 |
The information in this article applies to:
SUMMARYAdvanced: Requires expert coding, interoperability, and multiuser skills. This article demonstrates how to create and use a form module procedure called AfterUndo. The AfterUndo procedure runs when edits made to the current record are undone. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual. NOTE: This article explains a technique demonstrated in the sample files, FrmSampl.exe (for Microsoft Access for Windows 95 version 7.0) and FrmSmp97.exe (for Microsoft Access 97). For information about how to obtain these sample files, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q150895 TITLE : ACC95: Microsoft Access Sample Forms Available on MSL ARTICLE-ID: Q175066 TITLE : ACC97: Microsoft Access 97 Sample Forms Available on MSL MORE INFORMATIONWhen you click Undo Record on the Edit menu or press the ESC key twice to undo changes to the current record in a form, there is no built-in form event that is triggered. The AfterUndo procedure simulates an AfterUndo event so that you can restore calculations that may have been set while the record was being edited. Follow these steps to create the AfterUndo procedure:
How to Use the AfterUndo ProcedureThe following example demonstrates how to use the AfterUndo procedure:
REFERENCESFor more information about determining whether a record on a form is being edited, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q122294 TITLE : ACC: How to Automatically Detect If a Form Is Being EditedFor more information about undoing changes, search the Help Index for "undoing changes when editing records," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: onundo
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |