none
Best method to duplicate record and related records while maintaining cancel ability RRS feed

  • Question

  • I have a Flavor Table with multiple FlavorDetails. My goal is to "Revise" the Flavor on the fly: A revise button would open a popup with the duplicated Flavor and it's duplicated FlavorDetails ready to be editted. A Save and Cancel button would either create or cancel the insertion of the new records. The part I haven't been able to wrap my head around would be the display of the related Detail records in a subform of the popup without the new Flavor record getting saved first. Should I approach this by saving the Flavor record first and having the cancel button delete the record or is there a better method? I have also considered assigning the FlavorID in the FlavorDetails record a number like 9999999 to display them in the subform and then reassigning those numbers to the newly created primary key of the Flavor after it is created upon the "Save" click. Please help! :D
    Monday, April 25, 2016 3:33 PM

All replies

  • You could use a temp table and copy the columns to the main table if user clicks Save

    Best regards, George

    Monday, April 25, 2016 3:51 PM
  • I wonder if using Transactions will work for you. If the user decides to Cancel, you can roll back the transaction. Just a thought...
    Monday, April 25, 2016 4:37 PM
  • Hi Borkith,

    >> The part I haven't been able to wrap my head around would be the display of the related Detail records in a subform of the popup without the new Flavor record getting saved first

    Could you share us how you create popup view? Did you develop with Access client or Access web app? In my option, you could create an unbound popup view, and while you open popup view, set the value for the textbox in popup view, then you could save the value into table while you want to save.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, May 4, 2016 6:18 AM