Declaring a database ?

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
 
C

chas

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
 

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