Compare old value with new value

M

Mike Collard

I have an unbound text box that gets populated with a
value which the user can then overtype. I want to be able
to trigger an event if the new value is different from the
old value. I don't think the On Change event will work
because that just detects if a value has been entered not
if it is different from the opening value.

So I need a method to compare the before and after values.
So far I have tried assigning the opening value to a
variable in the On Got Focus event and then comparing the
After Update value with this variable but Access doesn't
seem to recognise the variable name in the After Update
event so the action fails. Is it something to do with
Private and Public variables and their scope?

Grateful for help

Mike Collard
 
A

alan fisher

I would try using the Tag property ( located in the Other
Tab of the text box, used to store anything you want to
it.) to store the original value and then compare on the
After Update event.
 

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