In the code window go to Tools|References. Check for the DAO reference. The
one that should be check is Microsoft DAO 3.6 Object Library. Also, make
sure it isn't listed as MISSING. To avoid confusion with ADO objects,
specify which you are using in your Dim statements.
Example:
Dim db As DAO.Database
Dim rst As DAO.Recordset
Some of the objects in DAO and ADO have the same name. When this happens
Access will use the references in the order that the checked ones are listed
in the references dialog unless you specify which one to use. While you can
use the arrow buttons in the dialog to change the order, if you specify you
don't have to worry about it getting changed if you move to another
computer. It also makes the code easier to read because you can tell right
away which of the two libraries is being used.
--
Wayne Morgan
Microsoft Access MVP
"Ping" <pl*@njit.edu> wrote in message
news:2d**************************@posting.google.c om...
Hi,
i am trying to : dim db As database and i have Access 2002. The
object type
"database" is not in the list and error message is "type mismatching "
when run.
i am wondering if the "database" object type is replaced by some other
object or i did not install the office XP correctly.
TIA.
Ping