04-18-2004, 06:31 AM
i have a database ....which has a lot of fields including a field called "ID" which is set to autonumber with no duplicates ...
now what i want to do is to copy the data in all the fields of the current recordset and add a new recordset & paste the copied data into the respective fields
thanks in advance
04-18-2004, 09:41 AM
If I understand you correctly the .Clone method of the recordset object might be of help.
04-19-2004, 07:02 AM
Or, if you simply want to take a table and stuff it into a new, non-existing table, looking into the "SELECT * INTO" sql method.
There are numerous other methods you could implement as well....let us know if the two methods provided aren't satisfactory
04-19-2004, 12:44 PM
thanks for ur ideas ....... but i don't think the clone method is of use to me
let me explain my problem .....
first a user starts a new form .......fills out the data and then saves it .... while saving the data is stored in a database as well as in a .rtf file
now if the user wants to open it again ....he opens the .rtf file ....... then in the code i search for the ID number then set the recordset to the record corrosponding to the ID number ..........
now what i want to do is.... to provide a kind of "save as" option during which all the data gets copied into a new record and then is saved ........(i.e with a different ID number )
..... does anyone have any idea as how to do it.......
thanks in advance
04-19-2004, 12:47 PM
There is no "save as" method for databases :). You are going to have to do one of two things:
1) AddNew: find the record and then create a new one based on your search condition
2) Update: find the record and then re-assign a new ID number or change the current data