Microsoft KB Archive/92895

{|
 * width="100%"|

INF: CopyObject Appears to Copy Wrong Object
'Article ID: Q92895

Creation Date: 17-NOV-1992

Revision Date: 30-NOV-1996' The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

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

The CopyObject macro command always copies the currently selected object from the Database window. If you precede this macro command with a SelectObject command, set its &quot;In Database Window&quot; parameter to No, and then run the macro from the Database window, the macro is the selected object and the object copied.

MORE INFORMATION

Steps to Reproduce Behavior

 Create a table and save it as Table1.  Create the following macro and call it Macro1. Add the following actions: Macro1 Actions -     SelectObject action Object Type: Table Object Name: Table1 In Database Window: No     CopyObject action New Name: Table2  Open and minimize the Table1 table. Select and run Macro1. Note that Macro1 is copied to Table2, not Table1.

NOTE: If &quot;In Database Window&quot; is set to Yes, everything works as expected. REFERENCES

For more information about the SelectObject action, search the Help Index for &quot;SelectObject Action,&quot; or ask the Microsoft Access 97 Office Assistant.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; 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: kbusage

KBSubcategory: McrActn

Additional reference words: 1.00 1.10 2.00 7.00 97 8.00