Need: I would like to have a button within a subform that allows you to copy all the data (many fields) and then paste it into an empty copy of the subform. Of course the info pasted would fill in all the fields etc.
Reason: We routinely need to move subform data from page 3 in the document to page 11 (example). Currently we insert a new subform and copy/paste each field from 3 to 11 and then delete 3. It would be great to press a copy button in 3 and insert a new subform and paste.into 11.
Is this possible?
Views
Replies
Total Likes
Some options (not all):
1) Use global data binding. If you know subform 11 is going to contain the same data as suform 3, name the objects in each subform the same. When you fill the data in subform 3, the objects with the same name in subform 11 will get filled with the same data.
2) Calculate event. For each object in suform 11, use the calculate event to set the value of each object to the value of the subform 3 object.
3) Code. Create a button to manually set the value of the subform 11 objects to the value of the subform 3 objects.
Steve
Steve's advice is good if this is a runtime question - how a user, filling out a form, can copy data from one section of the form to another.
If this is a buildtime question - how a developer can duplicate a subform to be used elsewhere in the same form or in a different form, you have the following options:
Ben Walsh
www.avoka.com
Thanks for the responses. I wrote code that on click copied the data from the cell into the paste cells and then the paste button copied the data from there to the new place. Works great. Example follows:
//Click event on Copy button
var shot = ShotDesc_subform.SimpleForm.GeneralInfo.ShtTextField1.rawValue
copyarea.ShtTextField1.rawValue = shot
//Click event on Paste button
//Undo in case you pasted by accident
var ushot = ShotDesc_subform.SimpleForm.GeneralInfo.ShtTextField1.rawValue
var pshot = copyarea.ShtTextField1.rawValue
//Undo
undoarea.ShtTextField1.rawValue = ushot
//Paste
ShotDesc_subform.SimpleForm.GeneralInfo.ShtTextField1.rawValue = pshot
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies