CurrentDB function causing Active X Error

Hi,
I've out a switchboard on one of my apps using the switchboard wizard thing.  Inside of the switchboard code, Access put in a function like Set Mydb = currendb().  (a function call I often use myself).

When you run the program on my clients machine you get the error "Can't create Active X component" (or something like that) when the Set Mydb=curentdb() line is called.

If you look under Tools->References (when you are in any module), Access reports back that it can't find the Microsoft DAO 3.5 (I think) object library.  So, if you attempt to add the object library back again using the file in c:\program files\micrsoft shared\common files\dao folder, it still moans at you.

I copied the c:\...\dao folder across from another computer that worked and relinked, but it still didn't work

Any ideas?

Malcolm
trevenaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DedushkaCommented:
Hi trevena.
First try to compact and repair you database and relink references
or create a new one and copy all your objects from old DB to this new DB.
Regards,
Dedushka
0
trevenaAuthor Commented:
Hmmm...
That's usually a good idea to fix bizzare bugs, but this is a computer specific problem.  Not a database specific problem.  ie all databases on this machine are getting similar problems.
Malcolm
0
DedushkaCommented:
Did you try to reinstall Access?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

trevenaAuthor Commented:
Yup.
Several times.
Still didn't work.
0
dtomynCommented:
Has Access (or Office) 2000 been installed on this computer recently?
0
trevenaAuthor Commented:
Access 97 by the way.
They did have a "data corruption" on the machine recently.  Not excatly sure what they mean by that.
It has been reinstalled several times by me recently.
0
TrygveCommented:
Have you referenced other ActiveX controls into the database. If so, you should refresh the refs. Uncheck and then reinsert them.

Also if this is an option for you, use this great opportunity to do a complete fresh-up of your computer. Go all the way from a format c: to installing the necessary programs. It may prove to be faster than trying to point the problem and you will end up with a lot healthier machine.
0
vboukharCommented:
You can re-register your DAO library with regsrv32 :
> regsvr32 dao350.dll

Another approach: look at MS KB article:
 
Q189366 Run-Time Error 429 Message Using Run-Time Application

 - Microsoft Access 97

SUMMARY
=======
 
Moderate: Requires basic macro, coding, and interoperability skills.
 
If you install a Microsoft Access run-time application on a computer that has not
previously had Microsoft Access installed, you may receive the following error
message when running code:
 
   Run-time error '429':
   ActiveX component can't create object
 
This error message can also occur on a computer that has Microsoft Access
installed if:
 
 - The Data Access Objects (DAO) Object Library, Dao350.dll, was not properly
   registered when Microsoft Access 97 was installed.
 
   -and-
 
 - You subsequently used Regsvr32.exe to register Dao350.dll.
 
This error can occur when DAO calls are made without using the Application object
DBEngine and the DAO Automation Server license key is unavailable. The
Automation Server license key is used to verify that the application has
authorization to use the server.
 
MORE INFORMATION
================
 
This error message does not imply that an ActiveX control is involved. In this
case, DAO, an ActiveX component, can't create an object because the DAO
Automation Server cannot be started.
 
When using the DAO server there are two ways the DAO license key can be provided
for verification.
 
1. An application, such as Microsoft Access, can place a license key in the
   registration database during installation. There are two conditions where the
   DAO license key is not written to the registry:
 
   a. During an Access run-time application installation.
 
   b. During a full installation of Microsoft Access, if DAO is not registered
      properly and you subsequently use Regsvr32.exe to register Dao350.dll.
 
2. The client application can pass the license key to DAO when the call is
   made.
 
   When the application calls DAO through Visual Basic for Applications code, the
   client application, in this case Visual Basic for Applications, does not
   provide the DAO license key. For example, the following code
 
         Set dbs = OpenDatabase("<path>\<filename>")
 
   would not provide the DAO license key because Access is using Visual Basic for
   Applications as the application.
 
   You can get Microsoft Access to provide its DAO license key by using DBEngine
   as the application in the Visual Basic for Applications call to DAO. For
   example, the following code
 
         Set dbs = DBEngine.OpenDatabase("<path>\<filename>")
 
   would provide the DAO license key because Microsoft Access is explicitly
   referencing DBEngine, the DAO object.
 
   Although the Application object, DBEngine, need only be referenced the first
   time DAO is used, it is good programming practice to use the Application
   object any time you reference DAO functionality in code.

Hope it helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trevenaAuthor Commented:
Thanks!
You da man...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.