change value in field

  • Thread starter Thread starter Gareth
  • Start date Start date
G

Gareth

I have 5 text boxes on my multipage form, each have an
afterupdate event.

The events are as follows:

Me!Status.Value = 2
Me!Status.Value = 3
Me!Status.Value = 4
Me!Status.Value = 5
Me!Status.Value = 6

This works fine if the user enters data but if he/she
enters data then realises it was entered incorrectly and
deletes the entry the value in the Status field is
incorrect. Is there any way that Access can 'remember'
the previous entry and put that back in if data in the
control is deleted.

Thanks in advance.

Gareth
 
Check the OldValue property of the control - it will retain the previously
saved value. However I'm not certain that this is going to be sufficient -
why not move the code to the BeforeUpdate event of the form - that way it
won't run until just before the record is saved.
 
Back
Top