I'm trying to inplement a new feature in a program I wrote a couple of years ago, the users would like to take a completed, existing record and re-create it as a new separate record, identical except for the control # (Which is also the key field for the record).
If I recall correctly, you can't simply change the key field name on the record and save it, right? Wouldn't the original record be lost? I don't want this to happen.
What I have in mind is to create two recordsets. Use the first to read the completed record. Open the second and give it an .AddNew command. Copy the record from one RS to the other, change the Control # on the second RS and save the record.
Two questions:
First, is there a command in ADO that lets you copy the data from one identical recordset to another?
Second, both RS' would be attached to the same table. Would that be a problem?
If there's a better way to do this please feel free to let me know. Thanks. I'm searching for an answer in my books but haven't found the answer yet.
If I recall correctly, you can't simply change the key field name on the record and save it, right? Wouldn't the original record be lost? I don't want this to happen.
What I have in mind is to create two recordsets. Use the first to read the completed record. Open the second and give it an .AddNew command. Copy the record from one RS to the other, change the Control # on the second RS and save the record.
Two questions:
First, is there a command in ADO that lets you copy the data from one identical recordset to another?
Second, both RS' would be attached to the same table. Would that be a problem?
If there's a better way to do this please feel free to let me know. Thanks. I'm searching for an answer in my books but haven't found the answer yet.