I have a main form with a sub form. On the main form I have a unbound combo box that is used to select a specific record for the subform. On the subform I have a "cancel" button that "undoRecord" any changes made without saving. This undo button is hidden unless there has been some edits made to the record.
When the user select a new record by way of the combo box I want to make the cancel button visibility false. The problem is this button still has the focus and I can not change its visibility to false.
Is here a good way to lose (or move) the focus from the button other than setting the focus to some other control on the subform?
I had assumed that then the user starts to select an new record the focus would move to the combo box, but since I am getting an error that the cancel button still has the focus and I can not change it visibility, I was mistaken.
I have tried the events for the combo box for click and change without any luck.