Code:
Private Sub StockQty_AfterUpdate()
Me.DateModified = Now()
Dim OldValue As String
Dim NewValue As String
Dim MaterialID As Double
MaterialID = Me.MaterialID
OldValue = Me.StockQty.OldValue
NewValue = Me.StockQty
DoCmd.RunSQL "INSERT INTO TblDataChanges ( Materialid, ChangeDate, ControlName, OldValue, NewValue, StockNumber ) VALUES ('" & MaterialID & "',Now(),'stockqty1' ,'" & OldValue & "', '" & NewValue & "', '" & StockNumber & "');"
Exit Sub
Me.DateModified = Now()
End Sub
hi above is the code i use for detailing all the changes i make to the stocklist in a table called " tbldatachanges " what i would like to do is now only show the changes to a certain type " for example " resin " not sure how to do that
thanks steve