ACC2: Modal Behavior Disabled By Restore, Minimize, & Maximize

Last reviewed: May 14, 1997
Article ID: Q158939
The information in this article applies to:
  • Microsoft Access 2.0

SYMPTOMS

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

If you set the Modal property of a form to Yes, the modal behavior of the form is partially disabled if you use the Minimize, Maximize, or Restore actions or methods on the form.

RESOLUTION

After you use Minimize, Maximize, or Restore, reset the Modal property of the form. In the following examples, replace <FormName> with the name of your modal form:

In a Macro

   Macro Name  Action
   --------------------
   Test1       Restore
               SetValue

   Test1 Action Arguments
   ---------------------------------
   SetValue:
      Item: Forms![<FormName>].Modal
      Expression: True

In Access Basic Code

   DoCmd Restore
   Forms![<FormName>].Modal = True

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.

MORE INFORMATION

When you use Restore, Minimize, or Maximize actions or methods on a modal form, the modal behavior is partially disabled because the form no longer retains the focus until you close it. You can change the focus to other database objects while the modal form is open.

Other modal behavior is unchanged. For example, the Modal property of the Form is still set to Yes, and Form Design on the View menu is unavailable.

Steps to Reproduce Behavior

  1. Open the Nwind.mdb sample database.

  2. Create a new blank form in Design view and set the Modal property to Yes.

  3. Set the OnLoad property of the form to the following event procedure:

          Sub Form_Load ()
          DoCmd Restore
          End Sub
    
    

  4. Save the form as ModalTest and close it.

  5. Open the ModalTest form. Note that while the form is open you can click the database window and switch the focus away from the modal form.

REFERENCES

For more information about the Modal property of forms, search for "Modal," and then "Modal Property" using the Microsoft Access Help menu.

For more information about the Restore, Minimize, or Maximize commands, search for "Restore," and the "Restore Action," or "Minimize," and then "Minimize Action," or "Maximize," and then "Maximize Action," using the Microsoft Access Help menu.


Additional query words: dialog
Keywords : FmsProp kbusage
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


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.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.