Declaring a database ?

  • Thread starter Thread starter Norman Belanger
  • Start date Start date
N

Norman Belanger

I'm just starting to use Access 2000 and not sure if I'm missing something
but somehow I can't declare a database. It doesn't appear to be an option
in the dropdown.

Dim db As database....., If I convert Access 97 to 2000 it's there. Is
there something I need to install?

Thanks

Norm
 
Hi Norm,

Access 2000 onwards uses a different 'default' data access
library for new databases (ADO). To use DAO you must
choose Tools>References in the VBA environment and
select 'Microsoft DAO 3.6 Object Library'. If you do not
intend to use ADO you can de-select the 'Microsoft Activex
Data Objects 2.x Library'. If you want to keep it you
must explicitly declare the type library for your
objects. For example:

Dim rs As DAO.Recordset
Dim rst2 As ADODB.Recordset

hth

chas
 
Back
Top