<p>I am getting a runtime error 13 at the end of the following code:</p>

<pre><code>Sub plausibilitaet_check()

Dim rs As DAO.Recordset
Dim rs2 As ADODB.Recordset
Dim db As database
Dim strsql As String
Dim strsql2 As String
Dim tdf As TableDef




Set db = opendatabase("C:\Codebook.mdb")
Set rs = db.OpenRecordset("plausen1")

Set rs2 = CreateObject("ADODB.Recordset")
rs2.ActiveConnection = CurrentProject.Connection


For Each tdf In CurrentDb.TableDefs

   If Left(tdf.Name, 4) &lt;&gt; "MSys" Then
        rs.MoveFirst
        strsql = "SELECT * From [" &amp; tdf.Name &amp; "] WHERE "



        Do While Not rs.EOF
            On Error Resume Next

            strsql2 = "select * from table where GHds &lt;&gt; 0"
            Set rs2 = CurrentDb.OpenRecordset(strsql2)
</code></pre>

<p>The error occurs at  Set rs2 = CurrentDb.OpenRecordset(strsql2)</p>

<p>Can someone see where I am going wrong?</p>

CurrentDB.OpenRecordset returns an instance of DAO.Recordset. You are trying to assign the result to ADODB.Recordset
Change the rs2 definition to
```
dim rs2 as DAO.Recordset
```