database Class

Brian Martin

Registered User.
Local time
Today, 23:42
Joined
Jul 24, 2002
Messages
68
I have copied forms and tables from one database to another. The problem is that in the new database the same line of code isn't working as it was in the old database. The code is:

Dim d As Database

The new database doesn't recognise the Database class. Database doesn't appear in the class list. What's going on and how can i fix it?
 
Dim db as DAO.Database

Open a module and go to Tools on the menu and the References.

You'll need to alter the priority of the Microsoft DAO 3.5 Object Library to above the Microsoft Active X Object Library
 
First guess is a missing reference.

Select the Modules pane of your Access window.

Open any code module. Open a new one if you must. You want a code window to become open.

Now on the MENU bar, find path Tools >> References

When you open up the References dialog box, you will see a list of modules. Some will be checked. Some will not. Some might have the word "MISSING" as a prefix.

You want to find the ones that are MISSING in that list. When you click (once) to select a module, its file specification including expected path are shown beneath the list area.

You have to try to find the missing modules on your disk somewhere. Use the BROWSE option that is part of the dialog box to find the file.

If the new database is not the same version as the old database, part of your problem might be that the library names changed between versions. In that case, you might have to guess as the newest version.

Example: When I copied some things from an Access 97 database to an Access 2K database, the DAO library changed from file DAO35.TLB to DAO36.TLB, which isn't the same. I had to use the BROWSE option to reconnect my DAO library to the new version of the file. Something similar might apply to your case. The database object exists in DAO for sure. Should also exist in Access library. Not sure where else it would appear.
 

Users who are viewing this thread

Back
Top Bottom