Hi All
I really need your help. I have table1 that logs any changes made in Table 2.
So far it logs the computer name of the individual who changed a field and the time.
What I desperately need is to have one further field to log. I need to log the field within table two that was changed.
I have put in my code so far to demonstrate it logging the computer name and time.
But like I said I need the field that was changed to be logged i.e. if the field changed was ‘Customer Name’ then in the table1 I need to have the final labelling this.
Please Help!!! Thanks
I really need your help. I have table1 that logs any changes made in Table 2.
So far it logs the computer name of the individual who changed a field and the time.
What I desperately need is to have one further field to log. I need to log the field within table two that was changed.
I have put in my code so far to demonstrate it logging the computer name and time.
But like I said I need the field that was changed to be logged i.e. if the field changed was ‘Customer Name’ then in the table1 I need to have the final labelling this.
Please Help!!! Thanks
Code:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
Dim r As String
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "G:\Knowledge\EndUser.mdb"
Set rs = cn.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
While Not rs.EOF
r = rs.Fields(0)
rs.MoveNext
Wend
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim fld As DAO.Field
Set db = CurrentDb
Set rst = db.OpenRecordset("Table1")
rst.AddNew
rst!Computer = r
rst!Date = Now()
rst.Update