Tracking Changes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I was wondering if someone could help me out. I have a simple table
(Table1) which maintains our projects and I'd like to be able track what
records have been changed and specifically what field on the record has been
changed.

Table1 has three fields (for simplicity):
Project_ID (AutoNumber)
Project_Name (Text)
Project_Details (Text)

Is it possible to create a table (Table2) to track the changes which
contains the following fields:
Project_ID: (Number-integer)
Update_Date: (Date/Time)
Record_Changed_From: (Text)
Record_Changed_To: (Text)

So for example, I could have Form1 open looking at Project_ID 12 and I want
to change the description from "Test Project 1" to "Test Project 2". After
the change has been made and the record is either saved or moved on to the
next record, could some code be written so that only the record that was
changed be appended to Table2 and show the following:

Project_ID: 12
Update_Date: 10/05/04
Record_Changed_From: Test Project 1
Record_Changed_To: Test Project 2

If someone could please help me out, that would be fantastic!!

Thanking you in advance,

Todd
 
Do a search. Tracking changes is a very very common question. Please
search for the answers to your issues before adding a new post.

Thanks,

Rick B
 
I did try a search first. But most result were answered by tracking changes
in the same table as the change was made. Sorry to be a bother.

TT
 
hi,
tacking changes is a common database function. has many
name, audit trail, history ect.
most database have a transaction history on there
inventory. and i think that is what you want.
here is some samply code i did for a access aplication
that track employee vacation time.this is the part that
created the history in the history table
PTOH is the history tale
Set dbs_PTOH = CodeDb()

Set rsPTOH = dbs_PTOH.OpenRecordset("PTOH", dbOpenDynaset)

With rsPTOH
AddNew 'Adds a history record
!PTOH_InputDate = Now()
!PTOH_Date = txtDate
!PTOH_Dept = txtDept
!PTOH_EmpID = txtEmpID
!PTOH_1HrPtoToDate = txt1HrPTOThisYr
!PTOH_Reason = cboReason
If Me.cboReason = "Sell Back" Then
!PTOH_PTOTime = txtSellBack * -1
Else
!PTOH_PTOTime = txtPTOThisTime
End If
.Update
End With
rsPTOH.Close
dbs_PTOH.Close
Call ClearForm
 
Thank you very much!

hi,
tacking changes is a common database function. has many
name, audit trail, history ect.
most database have a transaction history on there
inventory. and i think that is what you want.
here is some samply code i did for a access aplication
that track employee vacation time.this is the part that
created the history in the history table
PTOH is the history tale
Set dbs_PTOH = CodeDb()

Set rsPTOH = dbs_PTOH.OpenRecordset("PTOH", dbOpenDynaset)

With rsPTOH
AddNew 'Adds a history record
!PTOH_InputDate = Now()
!PTOH_Date = txtDate
!PTOH_Dept = txtDept
!PTOH_EmpID = txtEmpID
!PTOH_1HrPtoToDate = txt1HrPTOThisYr
!PTOH_Reason = cboReason
If Me.cboReason = "Sell Back" Then
!PTOH_PTOTime = txtSellBack * -1
Else
!PTOH_PTOTime = txtPTOThisTime
End If
.Update
End With
rsPTOH.Close
dbs_PTOH.Close
Call ClearForm
 
Rick...you are a jerk. Search on that and dont waste
other peoples time posting these types of responses.
 
Back
Top