Dim db as database and other built in functions

C

Chad

I just recently upgraded from ACCESS 97 to ACCESS 2002
and am haveing trouble with some of the built in
functions. When I try to set a variable to the DATABASE
object it errors. Any help??
 
V

Van T. Dinh

Access97 has the Microsoft DAO Object Library in the References Collection
by default. Access2002 has ADO Object Library by default, NOT DAO which you
need as the Database Object belongs to DAO.

Add the Microsoft DAO Object Library to the References Collection of your
database and if you don't use ADO, remove the ADO Object Library from the
References Collection.

Also, not that both DAO & ADO have objects of the same name but they are not
compatible. When you declare these (e.g Recordset), you should (and in some
cases, must) disambiguate them like:

Dim rst As DAO.Recordset
 

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