Hello,

I have an Access97 app and some forms (unbound fields). Iam trying to capture and changes to the form and created a history table. Looking at an example , I placed the code in the before_update behind every field.
The code

WriteAuditUpdate txtTableName, Me.txtSerialNumber, "Location", Me.txtLoc.OldValue, Me.txtLoc.Value


' Module
'-----------

Option Compare Database
Option Explicit

Sub WriteAuditUpdate(txtTableName, lngRecordNum, txtFieldName, OrgValue, CurValue)
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("AuditTable")

rs.AddNew
rs!TableName = txtTableName
rs!RecordPrimaryKey = lngRecordNum
rs!FieldName = txtFieldName
'rs!LoginName = Environ("UserName")
'rs!MachineName = Environ("computername")
rs!LoginName = GetCurrentUserName
rs!MachineName = GetComputerName
rs!User = CurrentUser
rs!OriginalValue = OrgValue
rs!NewValue = CurValue
rs!DateTimeStamp = Now()
rs.Update
rs.Close
db.Close
End Sub

I am aable to capture all but the previous value. What am I doing wrong ?
Thanks