?
Solved

activex error

Posted on 2003-12-08
1
Medium Priority
?
193 Views
Last Modified: 2010-05-01
i have the following code:

Private WithEvents rsSample as ADODB.Recordset
Set rsSample = New ADODB.Recordset

at the second line i get an error that Activex cannot create the object. why am i getting this error and what do i do?
0
Comment
Question by:RTKVSNL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
TimW1 earned 200 total points
ID: 9902519
I am assuming here that Private withevents etc is declared class scope and set rsSample etc is inside a function somewhere?
I also assume its not in a module? (if any of this is not corrrect or you are not sure please let me know)

First check the version of MDAC.  Open regedit and check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\Version
If you don't have that key or the latest version you may want to download it from MS.  2.8 is currently the latest I think.(http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en)
Check the reference in VB.  Menu "Project - References".
You need to have "Microsoft ActiveX Data Objects 2.6 Library" checked.  (Or whatever version you have installed)
Also if you have more than one project in a group file then you need to rerence each project that requires access to the objects.

Just curious but does the error message still happen if you remove withevents.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question