Discussion Locked

ADO clone

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I keep getting "Method or data member not found" with Clone method highlighted during compile time for the code listed below:
Private Sub datClone()
Dim rstClone As Recordset
rstClone = datCustomers.Clone(adLockReadOnly)
End Sub

datCustomers is my ADO object on the form, created during form design time.

3 replies

by lifeform2749

Hi Setivi,

I speculate that your datCustomers is actually an ADO data control, not and ado recordset.

The ADO data control does not have a Clone property.

The syntax you are using is correct if the object (datCustomers) is actually an ADOrecordset. If you properly establish an ADO recordset, your clone code will work.....

Note: I would suggest that you actually declare your clone recoredset as:

dim rstClone as ADODB.Recordset

This removes all ambiguity about what kind of recordset you are working with.

This discussion is closed to new replies.