RecordsetClone Property Error

John Baker

Registered User.
Local time
Today, 01:23
Joined
Apr 13, 2005
Messages
35
Having difficulty with executing the Recordsetclone property of my form.

Recordsource for 'frm_event' is based on a table, tbl_events.

On the Form's 'OnCurrent' event, I make a call to the function 'DisableEnable([Form])':

Public Function DisableEnable(frm As Form)
Dim rstClone As Recordset
Set rstClone = frm.RecordsetClone

Getting a 'Type mismatch' error when I try to create the RecordsetClone.

This is my first attempt at working with the RecordsetClone property.

Any help or guidance would be appreciated!

John
 
Do you have a refererence set for DAO? RecordSetClone is DAO. <ALT> F11 Tools>References.
 
Yes, I have a reference set to the Microsoft DAO 3.6 Object Library.
 
The RecordSetClone is always available so you don't really need to set a reference to it except under certain conditions. You should really disambiguate the references like:
Dim rstClone As DAO.Recordset

then you would set the object with:
Set rstClone = Me.RecordsetClone
 
All,

I am having a similar problem, I have my code set up exactly as you have advised in this thread but I still get a Run-time Error 13, Type mismatch error?

I have the DAO referenced as well.

Any idea's ?

Many thanks

MattP
 
Please post the code you are using and show the line that is raising the error.
 
RuralGuy,

I started from scratch and got the code working in the ned, thanks for your response anyway.

MattP
 

Users who are viewing this thread

Back
Top Bottom