I have a toggle button that changes its color and caption whenever an option is chosen. I made a checkbox linked to a field to store the value, hid it, and then made the toggle button that checks or unchecks the hidden box in it's onClick event, along with changing the appearance of the button itself.
The problem is when I click the button to change the checkbox, but press the escape button to cancel the changes before the record is saved, the button does not revert back even though the checkbox does. This makes sense since the change in the button is done purely with VBA code, but I don't know how to detect if the button should be reverted or not. The form's Undo event only fires before the reversion of the checkbox takes place.
The problem is when I click the button to change the checkbox, but press the escape button to cancel the changes before the record is saved, the button does not revert back even though the checkbox does. This makes sense since the change in the button is done purely with VBA code, but I don't know how to detect if the button should be reverted or not. The form's Undo event only fires before the reversion of the checkbox takes place.