change value in field

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
 
S

Sandra Daigle

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.
 

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