ACC95: Can't Use Visual Basic 4.0 OLE Controls in MS Access 95

Last reviewed: February 25, 1998
Article ID: Q146612
The information in this article applies to:
  • Microsoft Access version 7.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you use an OLE control in a Microsoft Access version 7.0 database, you may experience one of the following symptoms:

  • You cannot save any changes made in the control's property sheet; the new settings are lost.
  • You receive an error message:

          This OLE Custom Control can't be enabled.
    

          -or-
    

          Microsoft Access doesn't support this OLE custom control.
    
  • The OLE control can't be displayed; you see a blank, white box in its place on a form.
  • An OLE control designed to contain other OLE controls does not work properly. That is, you cannot embed another OLE control within it.

CAUSE

You are using an OLE control that is not designed for use in Microsoft Access 7.0.

Each OLE-container application, such as Microsoft Access or Microsoft Visual Basic version 4.0, can support different levels of the OLE Custom Control specification. OLE controls designed for one application may have particular features or behaviors that are not supported by other applications. This is the case with Microsoft Access 7.0 and Visual Basic 4.0 OLE controls. You may also see inconsistent behavior if you use Visual Basic 5.0 ActiveX controls with Microsoft Access 7.0.

Visual Basic OLE controls use several extensions of the OLE Custom Control specification that Microsoft Access OLE controls do not use. For example, Visual Basic OLE controls have the ability to bind an entire record of data and the ability to contain other OLE controls. These features are not supported by Microsoft Access OLE controls.

RESOLUTION

Use an OLE control designed for Microsoft Access 7.0. The Microsoft Access Developer's Toolkit (ADT) for Windows 95 has twelve 32-bit OLE controls that are supported by Microsoft Access. These controls include the following:

  Custom Control            File Name      Size      Date       Version
  ----------------------------------------------------------------------

  Common Dialogs            Comdlg32.ocx   92,672    11-02-95 1.0.2415

  Data Outline 1.1          Msdboutl.ocx   418,304   11-02-95   1.10

  Microsoft Rich Textbox    Richtx32.ocx   95,744    11-02-95 1.0.2619

  SpinButton                Spin32.ocx     52,736    11-02-95 1.00.0044

  Microsoft Windows
  Common Controls:          Comctl32.ocx   331,264   11-02-95 1.0.2630

     ImageList
     ListView
     ProgressBar
     Slider
     StatusBar
     TabStrip
     Toolbar
     TreeView

NOTE: The ADT OLE controls are newer versions of several OLE controls included with Microsoft Visual Basic 4.0. If you have both the ADT and Visual Basic set up on your computer, the latest versions (listed above) are automatically installed. Note that you can distribute these 32-bit custom controls in either the ADT or Visual Basic applications.

REFERENCES

For more information about the differences between OLE controls in Microsoft Access and Microsoft Visual Basic, search for "custom controls," and then "Differences Between Custom Controls in Microsoft Access and Microsoft Visual Basic" using the Microsoft Access Developer's Toolkit for Windows 95 Help Index.

For more information about the ADT, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q136130
   TITLE     : ADT95: Overview of MS Access Developer's Toolkit (ADT)
Keywords          : kberrmsg kbinterop
Version           : 7.0
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbprb
Solution Type     : Info_Provided


================================================================================


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: February 25, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.