ACC: OLE MS Excel, Word Do Not Close When Form Is Closed
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,
a form, or a 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
- Open the sample database Northwind.mdb (or Nwind.mdb in earlier
versions).
- Create a new form not based on a table or query and open it in
Design view.
- On the Insert menu, click Object (or on the Edit menu, click Insert
Object in versions 1.x and 2.0).
- Select Microsoft Excel Worksheet in the Object Type box, and then click
OK.
- When a new worksheet opens in Microsoft Excel, type some sample text in
a few cells, and then exit Microsoft Excel.
- Set the following properties of the new embedded object control on the
form:
Enabled: Yes
Locked: No
- Save the form as frmExcel and close it.
- Open the frmExcel form in Form view.
- Double-click the embedded Excel worksheet object that you just created.
- When Microsoft Excel opens and displays the worksheet, minimize
Microsoft Excel and then close the Microsoft Access form.
- 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
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
|