Cloning problem -- please please please help 
Author Message
 Cloning problem -- please please please help

Hi everybody:

I am trying to make a clone of a snapshot-type recordset in VB4 16-bit under
Win 3.11.  The recordset is in a datacontrol (Data2).  I want to make a clone
of it to search for the selected item in a DBList.  I need to use a clone so I
don't change the bookmark of the recordset in the list.  I used the following
code:

...
Dim Clone2 as Recordset
Clone2 = Data2.Clone
...

At run time, I get the error "Argument not optional" with "Clone2 = "
highlighted.  I tried changing Data2.Clone to Data2.Recordset.Clone and got an
error (Method or data member not found, with ".Recordset" highlighted.  I
tried adding Dim Data2 as Recordset before the clone command (which I don't
think is necessary because the recordset already exists in the datacontrol at
startup, but I tried anyway).  Still no luck.

What am I missing?

Any help would be greatly appreciated.



Fri, 19 Mar 1999 03:00:00 GMT  
 Cloning problem -- please please please help

An update to my idiotic post:

I did a classic RTFM here.  I'm sorry.  I forgot to use Set....
Ignore me.  Flame me.  I deserve it.

jjs


says...

Quote:

>Hi everybody:

>I am trying to make a clone of a snapshot-type recordset in VB4 16-bit under
>Win 3.11.  The recordset is in a datacontrol (Data2).  I want to make a clone
>of it to search for the selected item in a DBList.  I need to use a clone so
I
>don't change the bookmark of the recordset in the list.  I used the following
>code:

>...
>Dim Clone2 as Recordset
>Clone2 = Data2.Clone
>...

>snip...



Fri, 19 Mar 1999 03:00:00 GMT  
 Cloning problem -- please please please help

[snip]

Quote:
>At run time, I get the error "Argument not optional" with "Clone2 = "
>highlighted.  I tried changing Data2.Clone to Data2.Recordset.Clone and got an

don't forget a recordset is an object:

        set clone2 = data2.recordset.clone

Jeff Fields


http://lonestar.texas.net/~jkfields/



Fri, 19 Mar 1999 03:00:00 GMT  
 Cloning problem -- please please please help

Quote:

>I am trying to make a clone of a snapshot-type recordset in VB4 16-bit under
>Win 3.11.  The recordset is in a datacontrol (Data2).  I want to make a clone
>of it to search for the selected item in a DBList.  I need to use a clone so I
>don't change the bookmark of the recordset in the list.  I used the following
>code:
>...
>Dim Clone2 as Recordset
>Clone2 = Data2.Clone
>...
>At run time, I get the error "Argument not optional" with "Clone2 = "
>highlighted.  I tried changing Data2.Clone to Data2.Recordset.Clone and got an
>error (Method or data member not found, with ".Recordset" highlighted.  I
>tried adding Dim Data2 as Recordset before the clone command (which I don't
>think is necessary because the recordset already exists in the datacontrol at
>startup, but I tried anyway).  Still no luck.
>What am I missing?

The syntax you're looking for is:

   Set Clone2 = Data2.Recordset.Clone()

At least, that's what the example in the help has.

Bob Rossney



Sat, 20 Mar 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. PLEASE HELP PLEASE HELP PLEASE HELP

4. Design Help PLEASE PLEASE PLEASE!

5. Please Please PLEASE HELP!!!!!

6. URGENT HELP PLEASE PLEASE PLEASE???

7. Please please please, help me :-)

8. Please, Please, Please I need help working with dates

9. Please, please, please help!!

10. Please, please, please, help!

11. Please, Please, Please I need your help with Winsock

12. Help Please Please Please

 

 
Powered by phpBB® Forum Software