Run-time error '13':

R

ren

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
 
A

Allen Browne

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
 
R

RuralGuy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top