Dim db as database and other built in functions

  • Thread starter Thread starter Chad
  • Start date Start date
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??
 
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
 
Back
Top