Need help setting the focus to a control
Posted on 2011-09-16
I use the AfterUpdate Event of a text box to test whether an acceptable input has been entered.
If the entry does not meet my test, I want to delete the entered information, display a msgbox, and then set the focus to the text box again (in the same form), so that a new entry can be made.
I have no trouble with the test and message box, but when I try to set the focus to the text box, the text box that gets the focus is always the next box in the tab sequence.
I've had this issue in the past, and have solved it by setting the focus to the text box before the intended text box, however, this time the text box that I want to set focus on is the first tab and it needs to stay that way.
Does anyone have any ideas?