Can't Dim db (1 Viewer)

crosmill

Registered User.
Local time
Today, 07:08
Joined
Sep 20, 2001
Messages
285
Access won't let me ...

Dim db As database

Saying user defined type not defined. But it will let me...

Dim rs As Recordset

But won't let me...

Set rs = db.openrecordset

Presumably the last one is directly related to the the first.


DOes anyone know why this is happening, and more importantly how to fix it!

Thanks
 

Fornatian

Dim Person
Local time
Today, 07:08
Joined
Sep 1, 2000
Messages
1,396
Check for missing references and make sure you have Microsoft DAO *.* library ticked, in my version(A97) I have Microsoft DAO 3.51 Object Library.

Also, you may need to explicitly reference the library depending on the priority level, I suspect the ADO library takes priority in higher versions so this may work for you.

Dim DB as DAO.Database
 

crosmill

Registered User.
Local time
Today, 07:08
Joined
Sep 20, 2001
Messages
285
Cheers Ian, that's done the trick.
 

Users who are viewing this thread

Top Bottom