存档已编辑/添加/删除的记录 [英] Archiving records which have been edited/added/deleted

查看:97
本文介绍了存档已编辑/添加/删除的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


好​​的,这是一个非常复杂的问题,我不知道如何去做...


目前,我的表格1基于表1.我需要创建一种跟踪任何编辑/添加/删除的方法,原因如下。目前,我有一种方法只允许用户按下提交按钮并在按下编辑或发生新记录事件时禁用导航按钮。此提交按钮使表单页脚显示保存按钮当前隐藏的位置。保存表单页脚然后再次消失,按钮返回启用状态。


我创建了这种格式,以便在我知道更多需要添加的内容时添加人员编辑的人/时/为什么出于质量保证的原因。表1中的字段需要在表格中以编辑原因进行存档。


我认为子表单可以在表单页脚中用于编辑字段,因为它们可以在一个表单上工作 - 与每条记录的关系很多。这种方法存在两个问题。


1 - 因为我需要绕过子窗体获得焦点时发生的更新,并且使用窗体和子窗体进行保存。 br />

2 - 我不知道如何每次都保留表1中的旧记录,即如果您需要编辑表单1中的字段并且之前已经编辑过它我怎么能使用新记录保存表1中的所有可编辑字段,而不是在编辑之前覆盖旧记录?


如果有人能理解这一点那么对你好。无论如何你可以想到帮助我,然后更好。


Leigh。

Hello,

Ok this is quite a complicated question and I''m not sure how to go about it...

At the moment I have Form 1 which is based on Table 1. I am required to create a method on tracking any edits/additions/deletions with a reason why. Currently I have a way of only allowing the user to press on a Submit button and disabling navigation buttons when edit is pressed or a new record event occurs. This submit button makes the form footer appear where the save button currently hides. Once saved the form footer then disappears again and the buttons return to enabled.

I created this format to add in fields of who/when/why the person is editing for quality assurance reasons when I knew more about what needed to be added. The fields within Form 1 need to be archived with the editing reasons within a table.

I thought maybe a subform would work within the form footer for the editing fields as they work on a one-many relationship with each record. There are two problems with this method.

1 - Being that I need to bypass the update which occurs when the subform gains focus and have the save occur with both the form and subform.

2 - I have no idea how to keep the old records from Table 1 each time, i.e. If you need to edit a field in Form 1 and have previously edited it before that how could I go about saving all the editable fields within Table 1 with a new record and not overriding the old one before edits?

If anyone can understand this then good on you. If you can think of anyway to help me then even better.

Leigh.

推荐答案

你可以复制编辑的/将数据删除到另一个名为operation_log的表中,其中包含编辑/删除的原因,编辑/删除的用户等,然后运行编辑/删除代码。


for add i don''你认为你需要复制operation_log表中的数据,但是你可以存储一些信息,即添加新数据和新数据。


希望它能正常工作。 :!
you can copy the edited/deleted data into another table named like operation_log with the reason of edit/delete, user who edited/deleted etc and after that run the edit/delete code.

for add i don''t think u need to copy the data in operation_log table, but u can store some information that who is adding new data along with new data.

hope it''s work. :!


感谢Ariful。


我环顾四周,大多数使用Audit Trails的人使用模块。模块的问题在于我希望用户能够添加themsleves的原因并输入他们用于更改的文档。该模块更自动,非常适合跟踪用户和进行更改的位置,但我想要这样,以及为什么用户正在更改数据。
Thanks Ariful.

I''ve looked around and most people that use Audit Trails use Modules. The problem with the Modules is that I want the user to be able to add the reason why themsleves and enter the document they are using for the change. The Module is more automatic, great for tracking the user and where the change is made but I''d like that and a WHY the user is changing data.


用于编辑/删除您可以使用查询(删除/更新查询)意味着编辑/删除的表单将与添加新数据的形式分开。您可以在编辑/删除表单中添加一个名为remarks的额外字段。你可以添加两个名为update和delete的按钮。每当用户点击更新/删除按钮时,将检查备注字段是否已填满。如果填满,那么将使用备注数据进行从实际表中复制该数据的查询。然后执行更新/删除查询。


希望它有所帮助。
for edit/delete you can use query (delete/update query) means the form for edit/delete will be a separate form from the form of adding new data. And you can add a extra field in edit/delete form named remarks. And you can add two button there named update and delete. whenever user click on update/delete button those will check the remarks field is filled up or not. if filled up then the query to copy of that data from the actual table will happen with the remarks data. And after that the update/delete query will execute.

hope it''s help.


这篇关于存档已编辑/添加/删除的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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