Microsoft KB Archive/103136
PRA: Open OLE Objects Not Saved When Record Changes (2.0)
Article ID: Q103136
If you are editing an OLE object that is opened from an OLE field, and you then move to a different record, there is no indication that the record was changed. The OLE object in the OLE server is closed and all changes to the object are lost.
Place the function called =ProcessOLEObject() in the OnExit property of the OLE object. Create the following module:
Function ProcessOLEObject () Saved = MsgBox("Have you saved your changes for this object?", 36) If Saved = 7 Then DoCmd CancelEvent DoCmd DoMenuItem A_FormBar, A_EditMenu, A_Object,
End If End Function
Every time you pass through the OLE field, the function will be run and the dialog box will be displayed. Unfortunately, there is no way to test whether or not the object has been edited.
In Versions 1.1 and 2.0
For example, the following message appears after you open one of the pictures in the Employees table in the sample database NWIND.MDB:
The object "Paintbrush Picture" is open for editing and may have been modified. Update before saving? Yes, No, Cancel or Help
Steps to Reproduce Problem
list, Paintbrush is no longer available. If you go back to the record
were editing, the picture will not contain the changes you made.
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 photo