Trying to keep a history of what happen in memo field

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
 
A

Alex Dybenko

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

Tempstorage=Me.History.OldValue

in Form's BeforeUpdate event

HTH
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top