- Microsoft ActiveX Data Objects Recordset (ADOR) type library.
- Microsoft ActiveX Data Objects (Multi-dimensional) (ADOMD) type library.
Steps to Reproduce Behavior
- Create a new project and add a command button (Command1) to a form.
- Add a reference to the Microsoft ActiveX Data Objects Recordset Library.
- Add the following code to the form:
Private Sub Command1_Click()
Dim cn As ADODB.Connection
- Run the project and click the command button. The error appears.
- Remove the reference, and add a reference to the Microsoft ActiveX Data Objects Library.
- Click the command button. The error does not appear.
- Microsoft Access users will have to use ADODB.Connection to avoid confusion with the DAO Connection object.
- If the Intellitype feature is turned on, you should notice that it does not show Connection as a valid object with the ADOR type library, but does with the ADODB type library. This is a good indication that you do not have the correct type library referenced.
- This error can also occur when referencing objects in other type libraries that aren't referenced.
Article ID: 184609 - Last Review: Aug 4, 2008 - Revision: 1