Microsoft KB Archive/111779

From BetaArchive Wiki

PRB: Cannot Open Datasheet As a Pop-Up or Modal Form

Article ID: Q111779
Creation Date: 17-FEB-1994
Revision Date: 19-SEP-1996 The information in this article applies to:

  • Microsoft Access versions 1.0, 1.1, 2.0

SYMPTOMS


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

Although you have set its Modal or PopUp properties to Yes, a form in Datasheet view opens as a typical form rather than as a modal or pop-up form. If an OpenForm macro action with a Dialog Window Mode argument is used to open the form in Datasheet view, the form opens as a modal, pop-up form.

CAUSE


You can only make forms that open in Form view modal or pop-up.

RESOLUTION


If you need to have a form in Datasheet view be displayed as a modal or pop-up form, consider placing the datasheet form as a subform in an unbound main form. The main form can be displayed in Form view as a modal or pop-up form. This also gives you the ability to add other features to your form,such as a Close command button, that you could not add otherwise.

STATUS


This behavior is by design.

MORE INFORMATION


Steps to Reproduce Behavior


Opening the Form with a Macro:

  1. Open the sample database NWIND.MDB.
  2. Create and then run the following new macro:

          OpenForm
             Form Name: Employees
             View: Datasheet
             Window Mode: Dialog

    Note that the form opens in Form view as a modal, pop-up form, rather than in Datasheet view.

Setting the Form's Modal and PopUp Properties:

  1. Open the sample database NWIND.MDB.
  2. Open the Employees form in Design view and set the following properties:

          DefaultView: Datasheet
          Modal: Yes
          Popup: Yes
  3. Save and then close the form.
  4. In the Database window, select the Employees form, and then choose Open. Note that the form opens in Datasheet view but is not modal or pop-up.

REFERENCES

Microsoft Access "User's Guide," version 1.0, Chapter 10, "Creating Forms Based On More than One Table," pages 272-274

Microsoft Access "User's Guide," version 1.1, Chapter 10, "Creating Forms Based On More than One Table," pages 278-280



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.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.


Additional reference words: 1.00 1.10 2.00
KBCategory: kbusage
KBSubcategory: FmsProp