ACC1x: Setting OLE Object Property May Cause GP Fault

Last reviewed: August 5, 1997
Article ID: Q96893
The information in this article applies to:
  • Microsoft Access version 1.0

SYMPTOMS

Microsoft Access will produce a general protection (GP) fault if the OLEDATA property is set to a null value or an invalid object.

CAUSE

OLEDATA is a property of an unbound embedded object used in either a form or report. The property is not available in the Object Properties dialog box; it is set by Microsoft Access and can only be modified using Access Basic code.

If the OLEDATA property is set to an invalid object, Microsoft Access will display the error "Not a valid OLE object." Microsoft Access will allow you to exit the dialog box and continue to work in design mode. The frame will remain in the form or report; however, since its link is broken, it will be dimmed. Access will produce a GP fault when leaving design mode to display the form in view mode, or the report in print preview mode.

If the OLEDATA property is set to null, Microsoft Access will display the error "The setting you entered isn't valid for this property" and produce a GP fault upon exiting the dialog box.

RESOLUTION

Setting the embedded objects Visible property to False will suppress the display of the object.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem was corrected in Microsoft Access version 1.1.

MORE INFORMATION

Any unbound embedded object inserted with the Paste, Paste Link*, or Paste Special* command is subject to the GP fault if the OLEDATA property is set to a invalid object.

Steps to Reproduce Problem

  1. Using Paintbrush, open any .BMP file.

  2. Select the object and copy it to the Clipboard.

  3. Exit Paintbrush.

  4. Open Microsoft Access and create a new database.

  5. Create a new form.

  6. In the form's Design view, paste in the object.

  7. Leave the form open and go to the Database window.

  8. Create a new module.

  9. Open the Immediate window.

    OPTION 1:

  10. Enter the following command:

    Forms![Form1]![Embedded0].OLEDATA=NULL

    Microsoft Access will display the following error:

    The setting you entered isn't valid for this property.

  11. Choose the OK button. Microsoft Access will cause a GP fault.

    OPTION 2:

  12. Enter the following command:

    Forms![Form1]![Embedded0].OLEDATA="X"

    Microsoft Access will display the following error:

    Not a valid OLE object

  13. Choose the OK button.

  14. Go back to Form1.

  15. Switch to the form's View window. Microsoft Access will cause a GP fault.
Keywords          : IntpOle EvnGpf kbole kbprg PgmOthr
Version           : 1.0
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbbug
Solution Type     : kbworkaround


================================================================================


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