Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello all, I have a database whi

Status
Not open for further replies.

BryanEaton

Technical User
Jan 15, 2003
17
0
0
US
Hello all,

I have a database which worked for a long time through a number of programmers, and from version 2 to version 97 of access. Recently it has been giving a Compile Error: Automation Error message when I try to compile or click on certain buttons. It wont even let me copy and paste within the module. It does highlight this line:

Dim dbs As Database, rst As Recordset

but it looks fine to me, and does this on a number of modules and CBF. I have tried to look for name conflicts, but cannot see any obvious ones, although I have not completed an exhaustive search.

Any ideas??
 
If you're using Access 2000+, then you need to set a reference to "Microsoft DAO 3.6 Object Library". Then your declaration statements should look like this:

Dim dbs as DAO.Database
dim rst as DAO.Recordset

However, there is a way so that Access will assume DAO 3.6 before ADODB. Not sure how at this moment. Gotta go. Don't have time to investigate further.
 
I actually have a number of copies of this database for different projects, and this is the only one the problem is happening to. I am running Office 97. There is a reference to Microsoft DAO 3.51 object library.

I have compared line for line the module that it debugs to, and they are the same. Is there maybe an easy way to get a list of function names in the modules to ensure there are no duplicates or named the same as 'keywords'.

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top