Run-time error '13':

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have sample code that declares a recordset, and then sets it as shown
below. The code works fine in the sample database (Dave & Robs Ice Cream
Shop.mdb) but when I use the code in my mdb, I get an error message;

Dim rstClone As Recordset
Set rstClone = Me.RecordsetClone

Run-time error '13':
type mismatch

The sample code is written for Access 2000 and I'm running it in Access XP
(2002?)

What am I doing wrong? Is there some setting that I've missed?

thanks
 
Reference problem.

From a code window, choose References on the Tools menu, and check the box
beside:
Microsoft DAO 3.6 Library

Then change your declaration to read:
Dim rstClone As DAO.Recordset

More info about references in the different versions of Access:
http://allenbrowne.com/ser-38.html
 
I have sample code that declares a recordset, and then sets it as shown
below. The code works fine in the sample database (Dave & Robs Ice Cream
Shop.mdb) but when I use the code in my mdb, I get an error message;

Dim rstClone As Recordset
Set rstClone = Me.RecordsetClone

Run-time error '13':
type mismatch

The sample code is written for Access 2000 and I'm running it in Access XP
(2002?)

What am I doing wrong? Is there some setting that I've missed?

thanks

Dim rstClone As DAO.RecordSet


_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Back
Top