M
Mike Collard
Apologies if this note is a duplicate but I have posted it
before and it was not displayed.
I have a form with an unbound text box that is populated
with a value by a procedure. If the user overtypes the
value in the text box with a new value I want this to
trigger an event.
The On Change event does not work because it only detects
if an entry is made, not if the entry value differs from
the original value, and although the user shouldn't
overtype with the same value it's possible they could get
focus on the control in error. So I need some code to
record the opening value of the control so that it can be
compared with the After Update value.
I have tried assigning the opening value to a variable
with the On Got Focus event and then referring to the
variable in the After Update event but it is not
recognised. I suspect it is something to do with the
scope of the variable i.e. how do I use the value of a
variable created in one procedure in another?
Any ideas/solutions appreciated.
Mike Collard
before and it was not displayed.
I have a form with an unbound text box that is populated
with a value by a procedure. If the user overtypes the
value in the text box with a new value I want this to
trigger an event.
The On Change event does not work because it only detects
if an entry is made, not if the entry value differs from
the original value, and although the user shouldn't
overtype with the same value it's possible they could get
focus on the control in error. So I need some code to
record the opening value of the control so that it can be
compared with the After Update value.
I have tried assigning the opening value to a variable
with the On Got Focus event and then referring to the
variable in the After Update event but it is not
recognised. I suspect it is something to do with the
scope of the variable i.e. how do I use the value of a
variable created in one procedure in another?
Any ideas/solutions appreciated.
Mike Collard