Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2004
    Posts
    35

    Question Unanswered: tracking changes in a table?

    I need to keep track of all of the changes in my database. I have it where it saves any changes in a form (see code below), but is there anyway to do it for a table? I know that the table does not have the "Afterupdate" which is needed, but I was wondering since I do most of my editing in the table mode.

    Thanks for your help.

    Here's the code I have on the form (Access2000/VBA 6.0)

    Field Name - Afterupdate ()
    Dim db as database
    Dim rs as recordset
    Set db = currentdb()
    Set rs = db.openrecordset(Select*from[tblRECORDCHANGES]")
    rs.AddNew
    rs![OLDVALUE] = FIELDNAME.OLDVALUE
    rs![NEWVALUE] = FIELDNAME.VALUE
    rs![DATE] = NOW()
    rs.update

    I should have tested this further before I submitted this. I'm REALLY new to VBA. I have put all of the field names of my form in the tblRECORDCHANGES, but it is not putting anything in those fields. Only the OLDVALUE and NEWVALUE fields are getting populated. Could anyne tell me how to fix that?
    Last edited by marshals; 11-04-04 at 17:11.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •