我想记录每天早上8:00到晚上20:00之间,记录删除的信息. 就是在这条信息删除之前把它转到TXT文档里......
从每周一至周的记录也是如此....
                                      多谢各位.....谢谢..

解决方案 »

  1.   

    '* 备注:由于FSO对象包含在Scripting 类型库 (Scrrun.Dll)中,所以在使用前首先需要在在工程中引用这个文件,
    '*      单击“工程”,“引用”,然后在“引用”对话框中选中“Microsoft Scripting Runtime”前的复选框,然后单击“确定”。*-----------------------------------------------------------------------------*
    '* 注释内容,用于保存详细log文件的方法。使用中。
      
      Public Sub Dtllog(ByVal logText As String)
          Dim fso     As FileSystemObject
          Dim fileName     As String
          Dim a     As Object
          Set fso = New FileSystemObject
          If fso.FolderExists(App.Path & "\log\") Then
            Set a = fso.OpenTextFile(App.Path & "\log\" & Format(Now, "yyyymmdd_") & "log.log", ForAppending, True) '记录文件在工程的LOG子目录下
          Else
            fso.CreateFolder (App.Path & "\log\")
            Set a = fso.OpenTextFile(App.Path & "\log\" & Format(Now, "yyyymmdd_") & "log.log", ForAppending, True) '记录文件在工程的LOG子目录下
          End If
          a.WriteLine (logText)                      '日期时间记录文本
          a.Close
      End Sub'*-----------------------------------------------------------------------------*Call Oplog.Dtllog( Str & vbCrLf) '调用过程记录日志。本文来自CSDN博客,转载请标明出处:
    http://blog.csdn.net/guanking/archive/2010/03/03/5342651.aspx
      

  2.   

    简单写个样子,多的自己动手,下班.CREATE trigger myTrig on yourtable
    for delete 
    as
    if 时间>'' and 时间<'' 
    insert into 表1 select * from deleted
    else if 时间>'' and 时间<'' 
    insert into 表2 select * from deleted