There is no practical way to copy all of the code that is involved with this problem as it's substantial and there are tons of references to multiple tables. As I have used debug.print I can find no reason why what is happening to occur.
I have a situation where in some conditions, that the program exits the sub using EXIT SUB as the command. Just prior to the EXIT SUB command I have txtItemBarCode.setFocus. And the program does set the focus to the text box because I added a test line in the code and it looks like this:
Code:
txtItemBarCode.SetFocus
txtItemBarCode.Text = "TEST"
Exit Sub
When I do a Step-By-Step through the program no other code is executed. But it is going to the next TabIndex and is setting the focus on that.
Any ideas as to why this is happening. Again I'm sorry that I really can't include the other parts of the code,. though I don't know how that will help since the textbox is receiving the focus but loses it the moment it exits the sub?
Thanks.
Ken L