ACC: How to Use In-Place Activation with OLE Objects

Last reviewed: April 2, 1997
Article ID: Q112748
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97

SUMMARY

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

Microsoft Access supports in-place activation of OLE objects in a form's Form view. In a form or report's Design view, or in a table, query, or form's Datasheet view, activation of an OLE object will cause the object's original application to run in the background as a server application (if the original application is available), so you can edit the object in Microsoft Access.

MORE INFORMATION

In-place activation of an OLE object allows you to edit or otherwise manipulate the object without switching to the object's original application. For example, you could edit an embedded document that was created in Microsoft Word for Windows without having to start Word for Windows.

When you edit an OLE object in place, the object's border becomes a hatched frame and the menus and menu options supported by the object's original application are added to the standard Microsoft Access menus. Toolbars supported by the object's original application may also be displayed.

The object's original application runs in the background and supplies the functionality it supports for the object, but the application is not visible and does not appear in the Windows Task Bar.

For an OLE object to be activated in place, the following must be true:

  • The object must have been created in an OLE server application that supports in-place activation.
  • The object must be displayed in an object frame on a form that is open in Form view.
  • The frame's Enabled property must be set to Yes.

If the Locked property is set to Yes, you will be able to edit the object, but will not be able to save the changes and will receive the following message when attempting to save:

   Microsoft Access can't save your changes to this bound OLE object
   because you don't have permission to write to the record in which the
   object is stored or the record is locked by another user.

If the object is linked, you can activate it in place, but you cannot edit it in place.

The AutoActivate property controls how an object is activated. The default value is Double-Click, which allows you to double-click the object to activate it. If you set the property to Manual, you have to select the object, choose <object type> from the Edit menu, and then choose the first verb listed to activate it. Setting AutoActivate to GetFocus (available only in unbound object frames) forces activation of the object when it receives focus on the form.

The following is an example of how to create an OLE object that supports in-place activation:

  1. Start Microsoft Access and either create or open any database.

  2. Create a new form.

  3. Using the Unbound Object Frame tool, create a new frame on the form.

  4. In the Object Type box, select a server that supports OLE 2.0. For this example, choose Microsoft Graph 5.0, and then click OK.

  5. On the Microsoft Graph File menu, click Exit & Return To Form: <Formname>.

  6. In Microsoft Access, set the frame's Enabled property to Yes and its Locked property to No.

  7. View the form in Form view.

  8. Double-click the embedded graph. The graph's border will change to a hatched frame, and several menus and menu options will change. If no Graph 5.0 toolbars are displayed, click Toolbars on the View menu and select one of the toolbar check boxes.

  9. Click anywhere in the form outside of the OLE object to deactivate the graph.

REFERENCES

For more information about in-place activation, search the Help Index for "in-place," or ask the Microsoft Access 97 Office Assistant.

For more information about whether or not a specific object application supports in-place activation, refer to that application's documentation.


Additional query words: interoperability ole embedding
Keywords : IntpOle
Technology : kbole
Version : 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbhowto


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