Recordset error

Neal

Registered User.
Local time
Today, 10:59
Joined
Feb 17, 2000
Messages
116
Hi,
I am having a problem with recordsets. When using this code:

Dim dbs As Database
Dim rst As Recordset

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("combined")

I get a type mismatch error message. (Combined is a table name).
Can anyone tell me why?
Thanks,
Neal
 
You are using DAO.

If you are using Access 2000 or 2002 then I think it is defaulted for ADO use.

To use DAO you will have to set references to the Microsoft Data Access Objects 3.5 or above library.

In a module, goto Tools -> References

Find the aforementioned library and check the box

Ensure its priority is above: Microsoft ActiveX Data Objects library.
 
It Worked!

Thanks very much.

I had referenced DAO 3.5, but it had a lower priority. I can't believe something like that would cause such a problem.

Neal
 

Users who are viewing this thread

Back
Top Bottom