PRA: DoMenuItem with AcPaste Constant Does Not Work Properly

    Article ID: Q148293
    Creation Date: 08-MAR-1996
    Revision Date: 03-DEC-1996

    The information in this article applies to:

    • Microsoft Access versions 7.0, 97

    SYMPTOMS

    Moderate: Requires basic macro, coding, and interoperability skills.

    When a DoCmd.DoMenuItem AcModule, AcEditMenu, AcPaste,,acMenuVer70 is run, the Copy command is selected from the Edit menu, instead of the Paste command.

    CAUSE

    The Microsoft Access 97 Object Library (7.0 Object Library in Microsoft Access for Windows 95) defines the constant acPaste with a value of three (3). However, the Paste command on the Modules menubar is at location four (4).

    RESOLUTION

    In Microsoft Access 97, the DoMenuItem method has been replaced with the RunCmd method. With this method you can use the following system command to correct the problem:

       DoCmd.RunCommand acCmdPaste
    
    
    In Microsoft Access 7.0 instead of using the AcPaste constant, use the value four (4), as follows:

       DoCmd.DoMenuItem AcModule, AcEditMenu, 4,,acMenuVer70
    
    
    STATUS

    Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and

    1. We are researching this problem and will post new information here in
    the Microsoft Knowledge Base as it becomes available.


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.

KBCategory: kbprg
KBSubcategory: MdlProb
Additional reference words: 7.00 97 8.00