Microsoft KB Archive/96460

{|
 * width="100%"|

PRB: Restore Macro Action Does Not Appear to Work
'Article ID: Q96460

Creation Date: 17-MAR-1993

Revision Date: 01-DEC-1996' The information in this article applies to:


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

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

In a macro, the Restore action does not restore a window previously minimized by the Minimize action.

CAUSE

When an object is minimized in Windows, the focus is automatically shifted to the next window. The Restore action attempts to restore a window that is already in a restored condition.

RESOLUTION

To make Windows act on the minimized object, you must first select the object. To select the minimized object, put a SelectObject action in the macro immediately before the Restore action.

MORE INFORMATION

Steps to Reproduce Behavior

 Start Microsoft Access and open any database.  Create the following macro in a new macro group called Macro1: Macro Name    Action ---     Test1          Minimize Restore   Create a new form called Form1 and add a command button to the form. Give the command button the following properties: In Microsoft Access 2.0, 7.0 and 97: Command Button OnClick: Macro1.Test1 In Microsoft Access version 1.x:      Command Button OnPush: [Macro1].[Test1]  Open Form1 in Form view and click the command button. Note that the form is minimized as expected, but is not restored to its original size.  To remedy this behavior, modify the macro that you created in step 2 to include a SelectObject action between Minimize and Restore: Macro Name    Action ---     Test1          Minimize SelectObject Restore Test1 Actions ---     SelectObject Object Type: Form Object Name: Form1 In Database Window: No 

REFERENCES

For more information about the Restore action, search the Help Index for &quot;Restore 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