- Local time
- Yesterday, 23:47
- Joined
- Feb 19, 2002
- Messages
- 46,708
Keep in mind that if you don't want to teach people to use esc to clear the previous field, the problem becomes much more complicated AND the control must be on the form where the control is. So, you can't use a control on a main form to "undo" something on the subform. PERIOD. Why? because moving focus from the subform to the main form, saves the subform record and so there is no way to undo it once it is saved. Moving control from the main form to the subform, saves the main form record whether you asked Access to do it or not. And that is one of the main reasons for putting the validation code in the Form's BeforeUpdate event rather than some random form or control event.
Also, in a mainform/subform situation, your cancel button won't work once you have moved focus to the subform because you can't undo something that was already saved.
Also, in a mainform/subform situation, your cancel button won't work once you have moved focus to the subform because you can't undo something that was already saved.