|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Compare opening and closing values
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 |
|
#2
|
|||
|
|||
|
You will need to declare a Public variable on the from, for the orignal value you are capturing with gotfocus. The you will be able to compare the public variable with what is now in the text box with the afterupdate
Use Public variables sparingly s- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Compare opening and closing values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|