OpenRecordset...Should be simple!

Jimmy Turnip

Registered User.
Local time
Today, 16:52
Joined
Sep 26, 2000
Messages
18
Please help! The following procedure (Access 2000) always comes up with error 13: Type mismatch. "Review Managers" is an existing Table in my database. I've checked for typos. What am I doing wrong?

Thanks.

Sub Test()

Dim dbs As DAO.Database
Dim rst As Recordset

Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Review Managers")

End Sub
 
Instead of

Dim rst as Recordset

Use this

Dim rst as DAO.Recordset

Access 2000 preferrs to use ADO recordsets by default. If you use DAO you must specify.

e_kimball@yahoo.com
 
Microsoft want you to use ADO not DAO in 2000.

Check your references to ensure the DAO 3.6 Library (DAO360.DLL) is installed and registered.

Microsoft want you to use ADO instead of DAO. The default library for 2000 is ADODB. To place the DAO library above the ADODB you will need to uncheck the ADODB lib, Check the DAO lib, close the references dialouge. Reopen the dialogue, check the ADO lib.

I understand that the DAO lib is not part of the standard install for 2000 but needs to be selected from a custom install (Subtle Microsoft Hint to move to ADO)

You can use both ADO and DAO in your project if you explicitly Dim them i.e ADODB.Recordset
DAO.Recordset

Isuspect we shall see this question posted a few more times as people convert to 2000


Note: I am idebted to Dev Ashish from the Access Web for providing this info
Regards
Trevor from www.accesswatch.co.uk
 

Users who are viewing this thread

Back
Top Bottom