Screen.ActiveControl.OldValue

  • Thread starter Thread starter katz
  • Start date Start date
K

katz

Hello!
It looks like the Screen.ActiveControl.OldValue, has the old value when you
open the form, but if I change the control two times, it will still have the
old value from the first time.
Is there a way to have the old value as it was changed, without closing the
form?
Thanks
Abe
 
katz said:
Hello!
It looks like the Screen.ActiveControl.OldValue, has the old value
when you open the form, but if I change the control two times, it
will still have the old value from the first time.
Is there a way to have the old value as it was changed, without
closing the form?
Thanks
Abe

The control's OldValue, for a bound control, is the value that it had
when the record was loaded into the form. That won't change until the
record is saved, so it won't reflect multiple changes made in the course
of editing the record. The only way you could keep track of them,
AFAICT, is to use code in the control's BeforeUpdate or AfterUpdate
event to save (in some module-level variable) what the control's value
has now become.
 

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

Back
Top