PRA: DoMenuItem with AcPaste Constant Does Not Work ProperlyArticle ID: Q148293Creation Date: 08-MAR-1996 Revision Date: 03-DEC-1996
The information in this article applies to:
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 acCmdPasteIn Microsoft Access 7.0 instead of using the AcPaste constant, use the value four (4), as follows:
DoCmd.DoMenuItem AcModule, AcEditMenu, 4,,acMenuVer70STATUS Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and
|
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.