I am checking for null fields in a BeforeUpdate event handler. If I find one, I set Cancel=True, set the focus for the empty text box and exit the event handler. When I return to the form, there is no focus at all. If I press the Tab key, nothing happens. I need to click in a text box to re-establish the focus.
I get to the BeforeUpdate Event handler by clicking an AddRecord button which is attempting to execute a GoToRecord acNewRec statement, placed there by the wizard that generated the code for the button. I get the impression that this statement is somehow canceling my setfocus, even though the action has been canceled.
Is there any way that I can programmatically set the focus?