Recordset Type Mismatch Error 
Author Message
 Recordset Type Mismatch Error

Can anyone tell me why I get the error below?  I am using Access 2002 in
Access 2000 file format.

Dim dbsA As Database, rst As Recordset
Dim  strSQL As String

Set dbsA = CurrentDb
strSQL = "SELECT * FROM WebPages ORDER BY URL"
Set rst = dbsA.OpenRecordset(strSQL)   *** Get Run Time Error 13: Type
mismatch here

Thanks,
  Roger



Thu, 14 Jul 2005 11:06:27 GMT  
 Recordset Type Mismatch Error
I needed to do

Dim rst As DAO.Recordset

Thanks anyway,
  Roger

Quote:
> Can anyone tell me why I get the error below?  I am using Access 2002 in
> Access 2000 file format.

> Dim dbsA As Database, rst As Recordset
> Dim  strSQL As String

> Set dbsA = CurrentDb
> strSQL = "SELECT * FROM WebPages ORDER BY URL"
> Set rst = dbsA.OpenRecordset(strSQL)   *** Get Run Time Error 13: Type
> mismatch here

> Thanks,
>   Roger



Thu, 14 Jul 2005 12:16:47 GMT  
 Recordset Type Mismatch Error
Or you could remove the reference to ADO if you aren't using it.
Both DAO and ADO have a recordset object so if you use both you need
to disambiguate your code as you discovered.
--
Joe Fallon
Access MVP


Quote:
> I needed to do

> Dim rst As DAO.Recordset

> Thanks anyway,
>   Roger


> > Can anyone tell me why I get the error below?  I am using Access 2002 in
> > Access 2000 file format.

> > Dim dbsA As Database, rst As Recordset
> > Dim  strSQL As String

> > Set dbsA = CurrentDb
> > strSQL = "SELECT * FROM WebPages ORDER BY URL"
> > Set rst = dbsA.OpenRecordset(strSQL)   *** Get Run Time Error 13: Type
> > mismatch here

> > Thanks,
> >   Roger



Fri, 15 Jul 2005 01:47:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. recordset - type mismatch error?

2. recordset - type mismatch error?

3. ADO Disconnected Recordset type mismatch error

4. Type Mismatch error while assigning a recordset

5. Type mismatch error setting ADO recordset

6. set .recordset gives type mismatch error

7. Type mismatch error when assigning a recordset to a data control (VB5)

8. Recordset Error Type Mismatch

9. Type Mismatch Error setting ADO recordset

10. VB 4.0 Data Control Recordset property generates a Type Mismatch error with DAO 3.5

11. Type mismatch error when assigning a recordset to a data control (VB5)

12. Type Mismatch error sending array or recordset variables to MTS from ASP

 

 
Powered by phpBB® Forum Software