ACC2000: Cannot Use acOLEDelete to Clear Object Frame

ID: Q199028


The information in this article applies to:

Advanced: Requires expert coding, interoperability, and multiuser skills.


SYMPTOMS

You cannot use the acOLEDelete argument of the Action method to clear an unbound object frame.


RESOLUTION

To work around this problem, set the unbound object frame's Visible property to False to hide it from the screen. To do so, follow these steps:

  1. Open the sample database Northwind.mdb.


  2. In the Database window, click Forms under Objects, and then click New.


  3. Create a new form not based on any table or query, and save the form as form1.


  4. Add an unbound object frame to the form. In the Insert Object dialog box, click Create from File, and then click Browse.


  5. Browse to the Windows folder, and double-click Setup.bmp.


  6. Click OK.


  7. Right-click the unbound object frame, and click Properties on the menu that appears.


  8. Set the following properties of the unbound object frame:


  9. Name: Ole1
    Enabled: Yes
    Locked: No
  10. Add a command button to the form. Right-click the button and change the Name property to Btn1.


  11. Set the OnClick property of the command button to the following event procedure:


  12. 
    Private Sub btn1_Click()
        Me!OLE1.Visible = FALSE
      End Sub 
  13. Open form1 in Form view and click the command button. Note that the unbound object frame disappears from the screen.



STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Repeat steps 1 through 8 of the "Resolution" section.


  2. Set the OnClick property of the command button to the following event procedure:


  3. 
    Private Sub btn1_Click()
        Me!OLE1.Action = acOLEDelete
    End Sub 
  4. Open form1 in Form view, and click the command button. Note that the unbound object frame is not cleared.


Additional query words: pra


Keywords          : kbdta 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 13, 1999