As a follow-up, saving the old value in the GotFocus() may not be too useful either. When the users leaves the container in which the checkbox resides and returns, that fires the GotFocus() of the checkbox again losing a change that may have been made. The only reliable way to use uOldValue with a checkbox is to set it in an AfterRequery method.
<i><font color="#663300">I found a little bug in cCheckbox. If anyone ever uses the uOldValue property to see whether a checkbox has changed, it doesn't work. Since the StoreOldValue method is called from the When event and the following event sequence fires when you click on a checkbox:
Form.Container.Checkbox.When() Form.GotFocus() Form.Container.GotFocus() Form.Container.Checkbox.GotFocus() Form.Container.Checkbox.Click() Form.Container.Checkbox.When()
it means that uOldValue and Value will always be the same. I believe the fix is to move the StoreOldValue call from the When event to the GotFocus event.</font></i>
:-) Pamela pamela /at/ eagle-crest DO.T com ©2001 Pamela Thalacker |