ACC2000: Cannot Use acOLEDelete to Clear Object Frame
Article ID: 199028
Article Last Modified on 7/15/2004
APPLIES TO
- Microsoft Access 2000 Standard Edition
This article was previously published under Q199028
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:
- Open the sample database Northwind.mdb.
- In the Database window, click Forms under Objects, and then click New.
- Create a new form not based on any table or query, and save the form as form1.
- Add an unbound object frame to the form. In the Insert Object dialog box, click Create from File, and then click Browse.
- Browse to the Windows folder, and double-click Setup.bmp.
- Click OK.
- Right-click the unbound object frame, and click Properties on the menu that appears.
- Set the following properties of the unbound object frame:
Name: Ole1
Enabled: Yes
Locked: No
- Add a command button to the form. Right-click the button and change the Name property to Btn1.
- Set the OnClick property of the command button to the following event procedure:
Private Sub btn1_Click()
Me!OLE1.Visible = FALSE
End Sub
- Open form1 in Form view and click the command button. Note that the unbound object frame disappears from the screen.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Additional query words: pra
Keywords: kbbug kbpending KB199028