Microsoft KB Archive/109328

From BetaArchive Wiki

PRB: CTRL+' Does Not Trigger Update Events in Datasheet View

Article ID: Q109328
Creation Date: 02-JAN-1994
Revision Date: 19-SEP-1996 The information in this article applies to:

  • Microsoft Access versions 1.0 and 1.1

SYMPTOMS


The CTRL+' key combination does not trigger either the BeforeUpdate or the AfterUpdate property of a form control when the form is in Datasheet view. The key combination also does not work in a control on a subform that is in Datasheet view.

RESOLUTION


Do not use macros or functions for the BeforeUpdate or AfterUpdate property of controls on forms that will be used in Datasheet view.

If you need to trigger update events for a control on a form that will be used in Datasheet view, such as a subform, create the form with a tabular look and set the DefaultView property of the form to Continuous Forms. This will produce a form that appears to be in Datasheet view, but will allow the update events to be triggered.

If you need to trigger update events for a control on a form that will be used in both Form view and Datasheet view, use a key assignment macro like Autokeys to select the field in the previous record, copy the value found there, return to the current record, and paste the value.

STATUS


This problem no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION


Steps to Reproduce Behavior


  1. Open the sample database NWIND.MDB.
  2. Create the following new macro called Test Macro:

          Test Macro Actions
          ----------------------------------
          MsgBox
             Message: This Field has Changed
  3. Open the Customers form in Design view.
  4. Set the Customer Name control's AfterUpdate property to Test Macro.
  5. View the form in Datasheet view.
  6. From the Records menu, choose Go To. Choose New.
  7. Select the Customer name field, press CTRL+', and then select another field in the same record.

Note that the message box does not appear, meaning that the AfterUpdate event was not triggered. Repeating steps 6-7 with the form in Form view will cause the message box to appear.



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.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.


Additional reference words: 1.00 1.10
KBCategory: kbusage
KBSubcategory: FmsEvnt