Old value, New Value

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

Guest

Hello,

I am trying to build an audit table for my db. Does a textbox control have
an old or original value property. Currently, when a form loads I am holding
original values of the controls on that form in gobal variables in a module
and then write the old and new values of the controls to an audit table. Any
Ideas?

Thank you
 
-----Original Message-----
Hello,

I am trying to build an audit table for my db. Does a textbox control have
an old or original value property. Currently, when a form loads I am holding
original values of the controls on that form in gobal variables in a module
and then write the old and new values of the controls to an audit table. Any
Ideas?

Thank you
.
Hi Chris,
a control has a .value property that stores the
current/new value and a .oldvalue property that stores the
previous value.

Luck
Jonathan
 
Hi Chris,
a control has a .value property that stores the
current/new value and a .oldvalue property that stores the
previous value.

Luck
Jonathan
.

Chris,

just wanted to add that you will need to utilise
the .oldvalue property during or before the
form.beforeupdate event. Once the record is
saved .oldvalue and .value become the same value.

Luck
Jonathan
 
Hello,

I am trying to build an audit table for my db. Does a textbox control have
an old or original value property. Currently, when a form loads I am holding
original values of the controls on that form in gobal variables in a module
and then write the old and new values of the controls to an audit table. Any
Ideas?

Yes; but only in certain events. For example, in the Form's
BeforeUpdate event you can refer to

Me!txtMyTextbox.Value
or
Me!txtMyTextbox.OldValue

In the AfterUpdate event, however, the data has already been written
to disk and the OldValue property is no longer available.
 
Back
Top