ADT/ODE: There is "No Object in this Control" Error MessageLast reviewed: December 11, 1997Article ID: Q177908 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multi-user skills. When you use an ActiveX control in a Microsoft Access application, the control may appear blank when the application is used in the run-time environment. You may also receive the following error messages
Run-time error '438': Object doesn't support this property or method -or- Run-time error '2683': There is no object in this control -or- Run-time error '2455': Application-defined or object-defined errorfollowed by:
Execution of this application has stopped due to a run-time error. The application can't continue and will be shut down.Your application then quits. The error you receive depends on both the ActiveX control and the version of the developer tools that you are using to distribute the application.
CAUSEYou have pasted a copy of an existing ActiveX control into your form.
RESOLUTIONYou can resolve this error by deleting the failing control from the form and adding a new control from the Insert menu. You should then rename the newly placed control to the same name as the old control so that any code existing on the form will work properly.
STATUSMicrosoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
1. Open Microsoft Access and create a blank database. 2. Import the Customers, Employees, and Orders tables from the Northwind sample database. In a typical install, the Northwind database is located at: C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb 3. Create a blank form, insert a Listview, control and name it ListV. 4. Type or paste the following code into the form's code module. Private Sub Form_Load() Dim clmX As ColumnHeader, mydb As Database, myrs As Recordset Dim itmX As ListItem Set mydb = CurrentDb Set myrs = mydb.OpenRecordset("Customers", dbOpenDynaset) Set clmX = ListV.ColumnHeaders.Add(, , "Company", ListV.Width / 3) Set clmX = ListV.ColumnHeaders.Add(, , "Address", ListV.Width / 3) Set clmX = ListV.ColumnHeaders.Add(, , "Phone", ListV.Width / 3) ListV.BorderStyle = ccFixedSingle While Not myrs.EOF Set itmX = ListV.ListItems.Add(, , CStr(myrs!CompanyName)) If Not IsNull(myrs!Address) Then itmX.SubItems(1) = CStr(myrs!Address) ' Address field. End If If Not IsNull(myrs!Phone) Then itmX.SubItems(2) = myrs!Phone ' Phone field. End If myrs.MoveNext Wend ListV.View = lvwReport End Sub Private Sub ListV_ColumnClick(ByVal ColumnHeader As Object) ListV.SortKey = ColumnHeader.Index - 1 ListV.Sorted = True End Sub Private Sub ListV_ItemClick(ByVal Item As Object) Select Case Item.Index Case Is <= 15 Exit Sub Case Is >= 15 ' Toggle Ghosted property. Item.Ghosted = Abs(Item.Ghosted) - 1 End Select End Sub 5. Save the form as ListVForm. 6. Open the form. The list should display without errors. 7. Create a new blank form and copy the ListV control from the previously saved form. NOTE: It is important that you copy only the control, not the whole form. Do not insert the control from the Insert menu. 8. Type or paste the code listed in step 4 into this new form. 9. Save the form as ListVCTlCopy. 10. Open the form. The list should display without errors. 11. Create a new form with a command button to open the ListVForm form and another command button to open the ListVCtlCopy form. 12. Save this form as MenuForm and in the Startup dialog box make it the Display Form. 13. Create a distribution disk set using the Setup Wizard and distribute the application to a clean Windows 95 computer. Make sure to include the ActiveX control file (.ocx) in the list of distribution files.When you run this application on the clean computer, the ListVForm form will work without any errors, but the ListVCtlCopy form will produce the errors described in the "Symptoms" section of this article.
REFERENCESFor more information about other issues involving the Office 97 Developers Edition Tools and ActiveX Controls, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q129303 TITLE : ADT/ODE: OLE Controls appear blank in Run-time Applications |
Additional query words: doesn't appear nothing does not ole
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |