ADT/ODE: There is "No Object in this Control" Error Message

Last reviewed: December 11, 1997
Article ID: Q177908
The information in this article applies to:
  • Microsoft Access Developer's Toolkit, version 7.0
  • Microsoft Office 97 Developer Edition Tools

SYMPTOMS

Advanced: 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 error

followed 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.

CAUSE

You have pasted a copy of an existing ActiveX control into your form.

RESOLUTION

You 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.

STATUS

Microsoft 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.

REFERENCES

For 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
Keywords : OdeGen IntpCstm kberrmsg
Version : WINDOWS:7.0,97
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: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.