Microsoft KB Archive/128255

= ACC2: Dialog Form Is Not Modal When DefaultEditing Is Set =

Article ID: 128255

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q128255



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



SYMPTOMS
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.



Steps to Reproduce Problem
 Open the sample database NWIND.MDB. Open the Employees form in Design view.  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  Open the Utility Functions module in Design view, and then choose Immediate Window from the View menu. 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.</li></ol>

Keywords: kbbug kbfix kbusage KB128255

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.