Object Library not Registered

R

RSteph

I was having a problem with Access getting my switchboard to work. Every time
I tried to make a switchboard then run it, I got an error: 429 (or something
like that), when I went to debug it was having some kind of problem with the
Connection String. So I tried creating a new Database, and making a
Switchboard, same problem.

So I decided to reinstall Microsoft Office, now every time I create a new
Database, and try to make a switchboard, an error message pops up with a:
"Microsoft Visual Basic" Heading saying "Object library not registered".

The help button does not offer help of a useful nature. If I click Ok, it
then goes on to tell me there's no Switchboard, do I want to make one, I try,
and I still get the same error with the .Connection line.

Any thoughts on what might be causing either of these errors?
 
R

RSteph

The only ones currently checked are:

Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library


If it helps any as well I'm running "MS Office Professional Enterprise
Edition 2003" on a "WindowsXP 2002 SP2" operating system.
 
R

RSteph

That got the Object Library not Reistered error fixed. I'm still having an
error everytime I try to open the Switchboard form.

Run-Time Error '429': ActiveX component can't create object.

When opening the debugger the error is onthe following line:
Set con = Application.CurrentProject.Connection

with .Connection highlighted.

The references currently checked on this database are:
Visual Basic For Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
Active DS Type Library
Active Setup Control Library

Any ideas on this problem by chance?
 
R

Roger Carlson

Three solutions:
1) Move the ActiveX Object Library higher than the DAO library in the list.
2) If you're not using DAO, you can get rid of that Library.
3) Another way is to explicitly define the object as an ADO object:
Dim con As ADODB.Connection

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
R

RSteph

This is getting very perplexing... I tried all three of your solutions, and
it's still giving me the same error. I'm starting to run out of ideas for
what's causing the problem with this. I've never had this much issue getting
a switchboard to work.
 
A

Allen Browne

Let's try to clarify what's happening here.

Is this switchboard form like the one that the Switchboard Manager creates,
so it gets its items from a table? Is this database split (front end/back
end), and if so is the switchboard table in the FE or the BE?

Temporarily choose set Tools | Startup | Display Form to "No Form". Does the
switchboard form give the same problem is loaded later?

Make sure the switchboard form's module has Option Explicit at the top. Then
choose Compile from the Debug menu.

If that doesn't work, try a decompile. (Post back for more details if you
aren't sure how.)
 
T

Tom Wickerath

Are you sure you really need those extra references, which were not present
earlier, ie.:

Microsoft ActiveX Data Objects 2.1 Library
Active DS Type Library
Active Setup Control Library

Make sure that your code compiles. When you are in any code module, click on
Debug > Compile ProjectName, where ProjectName represents the name of your
VBA project. Fix any compile errors that you might find. If the menu item
appears greyed out, then your code compiled okay.

Next, try deselecting one reference at a time, making a note of each
reference. Click on the OK button to dismiss the references dialog. Then
click on Debug > Compile ProjectName again. If your code compiles okay, then
you did not need the reference that you just deselected. On the other hand,
if you all of a sudden generate a compile error, then go back in and
re-select the indicated reference. I don't expect that any of the above
discussion will solve the error message that you are getting, but it is
always a good idea to include references only if they are truly needed.
Having extra checked references just consumes RAM memory needlessly, and
increases the chances of any given user encountering a MISSING reference
error.

It sure sounds like you are using a switchboard manager created switchboard.
You can verify this by looking for a table that is named Switchboard Items.
Starting with Access 2000, the switchboard manager wizard uses late bound ADO
code. This means that a reference to the ADO library (ie. Microsoft ActiveX
Data Objects 2.1 Library) is NOT required, if this form represents the only
ADO code in your database. Early bound code requires references; late bound
code has the advantage of not requiring checked references.

I recommend re-registering the following two files. Note that the path to
each file may be different on your PC. To do this, click on Start > Run. Then
copy each of the statements shown below, one-at-a-time, and click on OK:

Regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao360.dll
Regsvr32.exe C:\progra~1\common~1\system\ado\Msado15.dll

Optional, but won't hurt is to make sure that dao350.dll is also properly
registered:
Regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao350.dll

Reference:
http://support.microsoft.com/?id=833220

Make sure that you have the latest version of MDAC (Microsoft Data Access
Components) installed:
http://msdn.microsoft.com/dataaccess

If you still cannot get the switchboard to function properly, then the code
behind this form may have become corrupted. Use the instructions shown here
to rebuild your switchboard form:

Q: I deleted my Switchboard form by accident and I do not have a backup.....
http://home.bendbroadband.com/conradsystems/accessjunkie/switchboardfaq.html#newform

Also recommended: Download the MDAC Component Checker utility and run it on
your PC:
http://support.microsoft.com/?id=307255

Finally, consider ditching the switchboard manager created switchboard, and
create your own unbound (ie. no record source) switchboard. Add command
buttons using the toolbox wizards to open the appropriate forms and reports.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
R

RSteph

I am using a switchboard manager created switchboard. This form is currently
the only ADO code in my database, everything else regarding the database is
run from web pages.

I ran all three Regsvr32 commands you listed. The switchboard now seems to
be popping up without a problem. So I'll start trying to remove some of the
unneeded refrences now that my code compiles.

Thank you very much to both you and Roger for all the help, this has been a
problem that's be frustrating me for a few days now. I'm glad to have the
problem resolved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top