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![OLDVALUE] = FIELDNAME.OLDVALUE
rs![NEWVALUE] = FIELDNAME.VALUE
rs![DATE] = NOW()
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?