在保持取消能力的同时复制记录和相关记录的最佳方法 [英] Best method to duplicate record and related records while maintaining cancel ability

查看:71
本文介绍了在保持取消能力的同时复制记录和相关记录的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有多个FlavorDetails的Flavor表。我的目标是"修改"即时风格:修改
按钮会弹出一个带有重复Flavor的弹出窗口,并且它的复制FlavorDetails已准备好进行编辑。 "保存"和"取消"按钮可以创建或取消插入新记录。我无法绕过的部分将是
弹出窗口子窗体中相关详细记录的显示,而不会先保存新的Flavor记录。我应该首先保存Flavor记录并使用取消按钮删除记录,还是有更好的方法?我有
还考虑在FlavorDetails记录中分配FlavorID,如9999999这样的数字,在子表单中显示它们,然后在"保存"创建后,将这些数字重新分配给Flavor新创建的主键。单击。请
帮忙! :D

解决方案

如果用户点击
保存,您可以使用临时表并将列复制到主表中EM>

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

解决方案

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


这篇关于在保持取消能力的同时复制记录和相关记录的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆