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:
- 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 this to be a problem in the Microsoft products listed
at the beginning of this article.
MORE INFORMATION
Steps to Reproduce Behavior
- Repeat steps 1 through 8 of the "Resolution" section.
- Set the OnClick property of the command button to the following event procedure:
Private Sub btn1_Click()
Me!OLE1.Action = acOLEDelete
End Sub
- 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