ACC: OLE MS Excel, Word Do Not Close When Form Is Closed

Last reviewed: May 28, 1997
Article ID: Q96465
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

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

Microsoft Access does not close some OLE servers if you close a table, form, or report while editing an OLE object embedded in it.

STATUS

This behavior is by design.

MORE INFORMATION

Microsoft Access does not close Multiple Document Interface (MDI) applications that do not support in-place activation, even if they were started as an OLE server for an object stored in Microsoft Access. An MDI application can edit and display multiple documents at once.

Microsoft Excel version 3.0 and Microsoft Word version 2.0 for Windows are examples of applications that remain open if you double-click an embedded object in Microsoft Access to activate it, and then switch back to Microsoft Access and close the table, form, or report without closing the embedded object.

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or Nwind.mdb in earlier versions).

  2. Create a new form not based on a table or query and open it in Design view.

  3. On the Insert menu, click Object (or on the Edit menu, click Insert Object in versions 1.x and 2.0).

  4. Select Microsoft Excel Worksheet in the Object Type box, and then click OK.

  5. When a new worksheet opens in Microsoft Excel, type some sample text in a few cells, and then exit Microsoft Excel.

  6. Set the following properties of the new embedded object control on the form:

    Enabled: Yes Locked: No

  7. Save the form as frmExcel and close it.

  8. Open the frmExcel form in Form view.

  9. Double-click the embedded Excel worksheet object that you just created.

  10. When Microsoft Excel opens and displays the worksheet, minimize Microsoft Excel and then close the Microsoft Access form.

  11. Note that Microsoft Excel is still open. You must activate the Microsoft Excel window and quit the program manually.

If you repeat these steps with applications such as Paintbrush, Microsoft Draw, or Note-It (these are not MDI applications), you will note that these servers close when the form closes.


Keywords : IntpOle
Technology : kbole
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


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 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.