Microsoft KB Archive/103136: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 28: | Line 28: | ||
Create the following module: | Create the following module: | ||
<blockquote><pre> Function ProcessOLEObject () | <blockquote><pre> Function ProcessOLEObject () | ||
Saved = MsgBox( | Saved = MsgBox("Have you saved your changes for this object?", 36) | ||
If Saved = 7 Then | If Saved = 7 Then | ||
DoCmd CancelEvent | DoCmd CancelEvent | ||
Line 45: | Line 45: | ||
For example, the following message appears after you open one of the pictures in the Employees table in the sample database NWIND.MDB: | For example, the following message appears after you open one of the pictures in the Employees table in the sample database NWIND.MDB: | ||
<pre> The object | <pre> The object "Paintbrush Picture" is open for editing and may have | ||
been modified. Update before saving? Yes, No, Cancel or Help | been modified. Update before saving? Yes, No, Cancel or Help | ||
</pre> | </pre> | ||
Line 69: | Line 69: | ||
----- | ----- | ||
<blockquote>THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED | <blockquote>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.</blockquote> | ||
''<span>©1997 Microsoft Corporation. All rights reserved.</span> <span>Legal Notices</span>.<br /> | ''<span>©1997 Microsoft Corporation. All rights reserved.</span> <span>Legal Notices</span>.<br /> | ||
'' | '' |
Latest revision as of 09:35, 20 July 2020
PRA: Open OLE Objects Not Saved When Record Changes (2.0)Article ID: Q103136
SYMPTOMS
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. RESOLUTION
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, A_ObjectUpdate 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 MORE INFORMATION Steps to Reproduce Problem
task list, Paintbrush is no longer available. If you go back to the record you 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
KBCategory: kbole
KBSubcategory: IntpOle