Am I missing a reference?

C

Conan Kelly

Hello all,

I'm trying to declare an object variable as a Table type, but it is not recognizing the keyword Table.

What reference do I need so I can use an object variable for tables? I would think that this reference would be set automatically.

Thanks for any help anyone can provide,

Conan Kelly
 
D

Dirk Goldgar

Conan Kelly said:
Hello all,

I'm trying to declare an object variable as a Table type, but it is
not recognizing the keyword Table.

What reference do I need so I can use an object variable for tables?
I would think that this reference would be set automatically.

There's no Table data type now, though there may have been in Access 1
or 2; I'm not sure. You probably want to use either the TableDef
object (for working with the design of tables) or the Recordset object
(for working with the data in tables or queries). Both of those objects
are defined in the Microsoft DAO 3.6 Object Library (if you're using
Access 2000 or later). If you're using Access 2000 or 2002, you'll have
to add a reference to this library, as it isn't added by default in
those versions.

Access 2000 and 2002 include the ADO (ActiveX Data Objects) library
instead of DAO, but for working with objects in .mdb files, DAO is
better. Unless you're working with data in a client/server database
such as SQL Server, you will probably want to remove the ADO library
reference, or at least make sure that the DAO reference is higher in the
priority list. That's because the two libraries define some objects
with the same names -- notably, the Recordset object -- and they aren't
compatible.
 

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