[Solved] Cloning records
Posted: Sun Apr 22, 2012 4:40 am
Can someone help me, PLEASE! I've spent hundreds of hours searching for a solution to this seemingly easy problem and the more I search the worse it gets. The previous discussions on this forum and the other material I'm able to find is a giant plate of spaghetti. It's no help and I'm not getting anywhere.
I have a form that enters data into a table. They work perfectly, all form controls and all table characteristics work exactly as intended. The table's primary key field is numeric, automatically filled by "<AutoField>." It does not appear on the form and always keeps whatever number the system gives it.
All I want to do is clone/duplicate a record, then edit and save the clone. I'm willing to manually save the record first, but having the cloning operation do the Save would be nice.
The closest I can get is a macro posted by Villeroy on Jan 6, 2008, that begins, "function CopyRow ... ." But it doesn't work. When I attach it to a pushbutton and file it in My Macros > Standard > Module1 and push the button while using the form, I get "BASIC runtime error, Property or method not found: ResultSetConcurrency." And worst of all, that error brings up a macro editor that I can't escape from. To continue working I have to take my machine down with the Windows Task Manager and restart OO.O, going all the way through the file restore process.
The frustration this is causing me is terrible. I can't think of a more common or fundamental data entry requirement than cloning records, but I can't do it because I can't figure out how to get OO.O to accomplish it.
If someone out there can help, I'll be very grateful. Just tell me what the mechanism is and how do I implement it. If it takes a macro, tell me where to find it and where to install it.
And if this solution is published somewhere and I'm not finding it, I sincerely apologize. Believe me, I've tried.
[SOLVED] Please see my after-note, posted in a separate, new reply.
I have a form that enters data into a table. They work perfectly, all form controls and all table characteristics work exactly as intended. The table's primary key field is numeric, automatically filled by "<AutoField>." It does not appear on the form and always keeps whatever number the system gives it.
All I want to do is clone/duplicate a record, then edit and save the clone. I'm willing to manually save the record first, but having the cloning operation do the Save would be nice.
The closest I can get is a macro posted by Villeroy on Jan 6, 2008, that begins, "function CopyRow ... ." But it doesn't work. When I attach it to a pushbutton and file it in My Macros > Standard > Module1 and push the button while using the form, I get "BASIC runtime error, Property or method not found: ResultSetConcurrency." And worst of all, that error brings up a macro editor that I can't escape from. To continue working I have to take my machine down with the Windows Task Manager and restart OO.O, going all the way through the file restore process.
The frustration this is causing me is terrible. I can't think of a more common or fundamental data entry requirement than cloning records, but I can't do it because I can't figure out how to get OO.O to accomplish it.
If someone out there can help, I'll be very grateful. Just tell me what the mechanism is and how do I implement it. If it takes a macro, tell me where to find it and where to install it.
And if this solution is published somewhere and I'm not finding it, I sincerely apologize. Believe me, I've tried.
[SOLVED] Please see my after-note, posted in a separate, new reply.