Trying to keep a history of what happen in memo field

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

Guest

I been trying to used a FORM Called ' FMainTD' "BeforeUpate" and
"AfterUpdate" feature to keep a history of record changes in the table. In
the Table
Table TD
----------History ...memo tdata ype
----------DateRecChanged .....Date/Time data type
----------Total........Dobule data type
Before the record changed using the "BeforeUpdate" I want to store
temporarily [History] say in variable "TempStorage" then in the AfterUpdate I
want "AND" the old data with the new data
[TempStorage]&[DateRecChanged[&[Total]
This way each change wiill gets "AND" to the old information, and a history
of changes will be kept.

Below is my attempt at coding this, but as you can see my knowledge in this
area is not great....can anyone help?

Thanks
Brad

Public Sub FMainTD_BeforeUpdate()
Dim Tempstorage as Variant
Tempstorage=Me.History
End Sub

Public Sub FMainTD_BeforeUpdate()
Me.History=Tempstorage&[DateRecChanged[&[Total]

End Sub
 
Hi,
in order to get "old" value of a field - you can use

Tempstorage=Me.History.OldValue

in Form's BeforeUpdate event

HTH
 
Alex,
Thank you for the help, I think I can get it now.
Again Thankyou
Brad

Alex Dybenko said:
Hi,
in order to get "old" value of a field - you can use

Tempstorage=Me.History.OldValue

in Form's BeforeUpdate event

HTH
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com



Brad said:
I been trying to used a FORM Called ' FMainTD' "BeforeUpate" and
"AfterUpdate" feature to keep a history of record changes in the table. In
the Table
Table TD
----------History ...memo tdata ype
----------DateRecChanged .....Date/Time data type
----------Total........Dobule data type
Before the record changed using the "BeforeUpdate" I want to store
temporarily [History] say in variable "TempStorage" then in the
AfterUpdate I
want "AND" the old data with the new data
[TempStorage]&[DateRecChanged[&[Total]
This way each change wiill gets "AND" to the old information, and a
history
of changes will be kept.

Below is my attempt at coding this, but as you can see my knowledge in
this
area is not great....can anyone help?

Thanks
Brad

Public Sub FMainTD_BeforeUpdate()
Dim Tempstorage as Variant
Tempstorage=Me.History
End Sub

Public Sub FMainTD_BeforeUpdate()
Me.History=Tempstorage&[DateRecChanged[&[Total]

End Sub
 
Back
Top