ACC2: Dialog Form Is Not Modal When DefaultEditing Is Set

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

SYMPTOMS

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

When you open a form as a dialog form by setting the OpenForm action's Window Mode argument to Dialog, the form is not modal as you expect.

CAUSE

The form contains code in its Open or Load event that modifies the DefaultEditing property.

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

Steps to Reproduce Problem

  1. Open the sample database NWIND.MDB.

  2. Open the Employees form in Design view.

  3. From the View menu, select Properties, and then set the OnOpen property (or OnLoad property) to the following event procedure:

          Sub Form_Open (Cancel As Integer)
                Me.DefaultEditing = 3   ' Read-only
          End Sub
    
    

  4. Open the Utility Functions module in Design view, and then choose Immediate Window from the View menu.

  5. Type the following line in the Immediate window

          DoCmd OpenForm "Employees",,,,,A_DIALOG
    

    and press ENTER. Note that the Employees form opens read-only, but that it is not modal; you can select other forms or the Database window.


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.